Create a watch
curl --request POST \
--url https://app.blockgence.com/v1/guard/watches \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "<string>",
"chain": "ethereum",
"name": "",
"purpose": "own",
"rules": {},
"shared": false
}
'import requests
url = "https://app.blockgence.com/v1/guard/watches"
payload = {
"address": "<string>",
"chain": "ethereum",
"name": "",
"purpose": "own",
"rules": {},
"shared": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
chain: 'ethereum',
name: '',
purpose: 'own',
rules: {},
shared: false
})
};
fetch('https://app.blockgence.com/v1/guard/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://app.blockgence.com/v1/guard/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([
'address' => '<string>',
'chain' => 'ethereum',
'name' => '',
'purpose' => 'own',
'rules' => [
],
'shared' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.blockgence.com/v1/guard/watches"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"name\": \"\",\n \"purpose\": \"own\",\n \"rules\": {},\n \"shared\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://app.blockgence.com/v1/guard/watches")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"name\": \"\",\n \"purpose\": \"own\",\n \"rules\": {},\n \"shared\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/guard/watches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"name\": \"\",\n \"purpose\": \"own\",\n \"rules\": {},\n \"shared\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}Guard
Create a watch
Starts monitoring an address on a network. Guard records its activity and raises alerts according to its rules.
Body: {"address": "0x…", "chain": "ethereum", "name": "…", "purpose": "own", "rules": {…}, "shared": false}.
purpose:own(your own wallet, such as an operational or treasury wallet; the default) oradversary(an attacker’s wallet you want to follow).rules: optional. Merged with the purpose’s default rules; the catalog is inGET /v1/guard/status.shared: withtrue, the whole organization can view the watch, and anyone who can view it can operate its alerts.chain:ethereumby default. The available networks are listed inGET /v1/guard/status.
The watch covers activity from the first block Guard reads after it is created, not earlier. That block is
reported in coverage.armed_block of the detail. For earlier activity, use tracing. An EVM address exists on
every network, but each watch covers a single network.
Returns the created watch.
Errors:
400: invalid address, a network Guard does not monitor (detaillists the supported ones), invalid purpose or rule, orsharedwithout an organization. Protocol contracts are registered withPOST /v1/guard/protocols.403: the plan’s watch limit was reached (10 onfree, 100 onproand 1,000 onenterprise), or the API key is not assigned to a person.409: you already have a watch for that address on that network.422: the body contains an unknown field.
Cost: free.
POST
/
v1
/
guard
/
watches
Create a watch
curl --request POST \
--url https://app.blockgence.com/v1/guard/watches \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "<string>",
"chain": "ethereum",
"name": "",
"purpose": "own",
"rules": {},
"shared": false
}
'import requests
url = "https://app.blockgence.com/v1/guard/watches"
payload = {
"address": "<string>",
"chain": "ethereum",
"name": "",
"purpose": "own",
"rules": {},
"shared": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
chain: 'ethereum',
name: '',
purpose: 'own',
rules: {},
shared: false
})
};
fetch('https://app.blockgence.com/v1/guard/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://app.blockgence.com/v1/guard/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([
'address' => '<string>',
'chain' => 'ethereum',
'name' => '',
'purpose' => 'own',
'rules' => [
],
'shared' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.blockgence.com/v1/guard/watches"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"name\": \"\",\n \"purpose\": \"own\",\n \"rules\": {},\n \"shared\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://app.blockgence.com/v1/guard/watches")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"name\": \"\",\n \"purpose\": \"own\",\n \"rules\": {},\n \"shared\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/guard/watches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"name\": \"\",\n \"purpose\": \"own\",\n \"rules\": {},\n \"shared\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}Authorizations
APIKeyHeaderBearerAuth
Headers
Body
application/json
Response
Successful response.