Create a watch
curl --request POST \
--url https://scienter.xyz/api/v1/alerts/watches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": {
"address": "<string>",
"mint": "<string>",
"minDead": 10
},
"channels": [
"webhook"
],
"webhookUrl": "<string>"
}
'import requests
url = "https://scienter.xyz/api/v1/alerts/watches"
payload = {
"target": {
"address": "<string>",
"mint": "<string>",
"minDead": 10
},
"channels": ["webhook"],
"webhookUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target: {address: '<string>', mint: '<string>', minDead: 10},
channels: ['webhook'],
webhookUrl: '<string>'
})
};
fetch('https://scienter.xyz/api/v1/alerts/watches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scienter.xyz/api/v1/alerts/watches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'target' => [
'address' => '<string>',
'mint' => '<string>',
'minDead' => 10
],
'channels' => [
'webhook'
],
'webhookUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://scienter.xyz/api/v1/alerts/watches"
payload := strings.NewReader("{\n \"target\": {\n \"address\": \"<string>\",\n \"mint\": \"<string>\",\n \"minDead\": 10\n },\n \"channels\": [\n \"webhook\"\n ],\n \"webhookUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scienter.xyz/api/v1/alerts/watches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target\": {\n \"address\": \"<string>\",\n \"mint\": \"<string>\",\n \"minDead\": 10\n },\n \"channels\": [\n \"webhook\"\n ],\n \"webhookUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scienter.xyz/api/v1/alerts/watches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target\": {\n \"address\": \"<string>\",\n \"mint\": \"<string>\",\n \"minDead\": 10\n },\n \"channels\": [\n \"webhook\"\n ],\n \"webhookUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"watch": {
"id": "<string>",
"target": {},
"channels": [
"webhook"
],
"webhookHost": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>",
"reason": "no_credential",
"entitlements_durable": true
}{
"error": "<string>"
}Alerts
Create a watch
Not open yet: answers 404 until switched on. operator and token take a Solana base58 address; record takes minDead of 3 or more. A key holds at most 25 watches and may change them 30 times an hour. The webhook channel is not offered until payloads are signed; its host must resolve to a public address.
POST
/
api
/
v1
/
alerts
/
watches
Create a watch
curl --request POST \
--url https://scienter.xyz/api/v1/alerts/watches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": {
"address": "<string>",
"mint": "<string>",
"minDead": 10
},
"channels": [
"webhook"
],
"webhookUrl": "<string>"
}
'import requests
url = "https://scienter.xyz/api/v1/alerts/watches"
payload = {
"target": {
"address": "<string>",
"mint": "<string>",
"minDead": 10
},
"channels": ["webhook"],
"webhookUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target: {address: '<string>', mint: '<string>', minDead: 10},
channels: ['webhook'],
webhookUrl: '<string>'
})
};
fetch('https://scienter.xyz/api/v1/alerts/watches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scienter.xyz/api/v1/alerts/watches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'target' => [
'address' => '<string>',
'mint' => '<string>',
'minDead' => 10
],
'channels' => [
'webhook'
],
'webhookUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://scienter.xyz/api/v1/alerts/watches"
payload := strings.NewReader("{\n \"target\": {\n \"address\": \"<string>\",\n \"mint\": \"<string>\",\n \"minDead\": 10\n },\n \"channels\": [\n \"webhook\"\n ],\n \"webhookUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scienter.xyz/api/v1/alerts/watches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target\": {\n \"address\": \"<string>\",\n \"mint\": \"<string>\",\n \"minDead\": 10\n },\n \"channels\": [\n \"webhook\"\n ],\n \"webhookUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scienter.xyz/api/v1/alerts/watches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target\": {\n \"address\": \"<string>\",\n \"mint\": \"<string>\",\n \"minDead\": 10\n },\n \"channels\": [\n \"webhook\"\n ],\n \"webhookUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"watch": {
"id": "<string>",
"target": {},
"channels": [
"webhook"
],
"webhookHost": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>",
"reason": "no_credential",
"entitlements_durable": true
}{
"error": "<string>"
}Authorizations
An sc_ key from https://scienter.xyz/settings/api, sent as Authorization: Bearer sc_.... The same key is accepted in the x-scienter-membership header. Prefer the header over any query form: a credential in a URL reaches access logs, proxies and browser history.
Body
application/json