curl --request POST \
--url https://app.blockgence.com/v1/incident \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"chain": "ethereum",
"exploit_tx": "<string>",
"victim": "<string>",
"addresses": [
"<string>"
],
"addresses_source": "<string>",
"hops": 2,
"fanout": 4,
"since": 0,
"window_days": 123,
"max_credits": 200,
"name": "<string>",
"watch": {
"create": true,
"follow_hops": true,
"shared": false
},
"protocol_addresses": [
{
"address": "<string>",
"source": "<string>",
"role": "protocol"
}
]
}
'import requests
url = "https://app.blockgence.com/v1/incident"
payload = {
"chain": "ethereum",
"exploit_tx": "<string>",
"victim": "<string>",
"addresses": ["<string>"],
"addresses_source": "<string>",
"hops": 2,
"fanout": 4,
"since": 0,
"window_days": 123,
"max_credits": 200,
"name": "<string>",
"watch": {
"create": True,
"follow_hops": True,
"shared": False
},
"protocol_addresses": [
{
"address": "<string>",
"source": "<string>",
"role": "protocol"
}
]
}
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({
chain: 'ethereum',
exploit_tx: '<string>',
victim: '<string>',
addresses: ['<string>'],
addresses_source: '<string>',
hops: 2,
fanout: 4,
since: 0,
window_days: 123,
max_credits: 200,
name: '<string>',
watch: {create: true, follow_hops: true, shared: false},
protocol_addresses: [{address: '<string>', source: '<string>', role: 'protocol'}]
})
};
fetch('https://app.blockgence.com/v1/incident', 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/incident",
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([
'chain' => 'ethereum',
'exploit_tx' => '<string>',
'victim' => '<string>',
'addresses' => [
'<string>'
],
'addresses_source' => '<string>',
'hops' => 2,
'fanout' => 4,
'since' => 0,
'window_days' => 123,
'max_credits' => 200,
'name' => '<string>',
'watch' => [
'create' => true,
'follow_hops' => true,
'shared' => false
],
'protocol_addresses' => [
[
'address' => '<string>',
'source' => '<string>',
'role' => 'protocol'
]
]
]),
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/incident"
payload := strings.NewReader("{\n \"chain\": \"ethereum\",\n \"exploit_tx\": \"<string>\",\n \"victim\": \"<string>\",\n \"addresses\": [\n \"<string>\"\n ],\n \"addresses_source\": \"<string>\",\n \"hops\": 2,\n \"fanout\": 4,\n \"since\": 0,\n \"window_days\": 123,\n \"max_credits\": 200,\n \"name\": \"<string>\",\n \"watch\": {\n \"create\": true,\n \"follow_hops\": true,\n \"shared\": false\n },\n \"protocol_addresses\": [\n {\n \"address\": \"<string>\",\n \"source\": \"<string>\",\n \"role\": \"protocol\"\n }\n ]\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/incident")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"ethereum\",\n \"exploit_tx\": \"<string>\",\n \"victim\": \"<string>\",\n \"addresses\": [\n \"<string>\"\n ],\n \"addresses_source\": \"<string>\",\n \"hops\": 2,\n \"fanout\": 4,\n \"since\": 0,\n \"window_days\": 123,\n \"max_credits\": 200,\n \"name\": \"<string>\",\n \"watch\": {\n \"create\": true,\n \"follow_hops\": true,\n \"shared\": false\n },\n \"protocol_addresses\": [\n {\n \"address\": \"<string>\",\n \"source\": \"<string>\",\n \"role\": \"protocol\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/incident")
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 \"chain\": \"ethereum\",\n \"exploit_tx\": \"<string>\",\n \"victim\": \"<string>\",\n \"addresses\": [\n \"<string>\"\n ],\n \"addresses_source\": \"<string>\",\n \"hops\": 2,\n \"fanout\": 4,\n \"since\": 0,\n \"window_days\": 123,\n \"max_credits\": 200,\n \"name\": \"<string>\",\n \"watch\": {\n \"create\": true,\n \"follow_hops\": true,\n \"shared\": false\n },\n \"protocol_addresses\": [\n {\n \"address\": \"<string>\",\n \"source\": \"<string>\",\n \"role\": \"protocol\"\n }\n ]\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>"
}{
"error": "source_unavailable",
"detail": "<string>",
"source": "<string>",
"reason": "<string>",
"retryable": true,
"chain": "<string>",
"primitive": "<string>",
"operation": "<string>",
"target": "<string>",
"http_status": 123,
"retry_after": 123,
"upstream_message": "<string>",
"source_fault": true,
"failure_cause": "<string>"
}Playbook de incidente: job con los pasos, el caso y la ventana de freeze (40 créditos más cada paso completado)
Playbook de incidente: crea un job que decodifica la tx del exploit, identifica al atacante,
calcula lo robado, rastrea con cruces, swaps y demix, mira la ventana de freeze y arma el caso. Responde 202 con el
id del job; el estado de cada paso, en GET /v1/incident/{job_id}. Cobra 40 de orquestación y cada paso completado
aparte (uno fallido no se cobra). El mismo pedido de la misma key en 24 h devuelve ese job, sin cobrar.
Costo: 40 créditos de base (solo si la respuesta es < 400; algunas rutas cobran menos si reusan un resultado guardado).
curl --request POST \
--url https://app.blockgence.com/v1/incident \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"chain": "ethereum",
"exploit_tx": "<string>",
"victim": "<string>",
"addresses": [
"<string>"
],
"addresses_source": "<string>",
"hops": 2,
"fanout": 4,
"since": 0,
"window_days": 123,
"max_credits": 200,
"name": "<string>",
"watch": {
"create": true,
"follow_hops": true,
"shared": false
},
"protocol_addresses": [
{
"address": "<string>",
"source": "<string>",
"role": "protocol"
}
]
}
'import requests
url = "https://app.blockgence.com/v1/incident"
payload = {
"chain": "ethereum",
"exploit_tx": "<string>",
"victim": "<string>",
"addresses": ["<string>"],
"addresses_source": "<string>",
"hops": 2,
"fanout": 4,
"since": 0,
"window_days": 123,
"max_credits": 200,
"name": "<string>",
"watch": {
"create": True,
"follow_hops": True,
"shared": False
},
"protocol_addresses": [
{
"address": "<string>",
"source": "<string>",
"role": "protocol"
}
]
}
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({
chain: 'ethereum',
exploit_tx: '<string>',
victim: '<string>',
addresses: ['<string>'],
addresses_source: '<string>',
hops: 2,
fanout: 4,
since: 0,
window_days: 123,
max_credits: 200,
name: '<string>',
watch: {create: true, follow_hops: true, shared: false},
protocol_addresses: [{address: '<string>', source: '<string>', role: 'protocol'}]
})
};
fetch('https://app.blockgence.com/v1/incident', 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/incident",
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([
'chain' => 'ethereum',
'exploit_tx' => '<string>',
'victim' => '<string>',
'addresses' => [
'<string>'
],
'addresses_source' => '<string>',
'hops' => 2,
'fanout' => 4,
'since' => 0,
'window_days' => 123,
'max_credits' => 200,
'name' => '<string>',
'watch' => [
'create' => true,
'follow_hops' => true,
'shared' => false
],
'protocol_addresses' => [
[
'address' => '<string>',
'source' => '<string>',
'role' => 'protocol'
]
]
]),
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/incident"
payload := strings.NewReader("{\n \"chain\": \"ethereum\",\n \"exploit_tx\": \"<string>\",\n \"victim\": \"<string>\",\n \"addresses\": [\n \"<string>\"\n ],\n \"addresses_source\": \"<string>\",\n \"hops\": 2,\n \"fanout\": 4,\n \"since\": 0,\n \"window_days\": 123,\n \"max_credits\": 200,\n \"name\": \"<string>\",\n \"watch\": {\n \"create\": true,\n \"follow_hops\": true,\n \"shared\": false\n },\n \"protocol_addresses\": [\n {\n \"address\": \"<string>\",\n \"source\": \"<string>\",\n \"role\": \"protocol\"\n }\n ]\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/incident")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"ethereum\",\n \"exploit_tx\": \"<string>\",\n \"victim\": \"<string>\",\n \"addresses\": [\n \"<string>\"\n ],\n \"addresses_source\": \"<string>\",\n \"hops\": 2,\n \"fanout\": 4,\n \"since\": 0,\n \"window_days\": 123,\n \"max_credits\": 200,\n \"name\": \"<string>\",\n \"watch\": {\n \"create\": true,\n \"follow_hops\": true,\n \"shared\": false\n },\n \"protocol_addresses\": [\n {\n \"address\": \"<string>\",\n \"source\": \"<string>\",\n \"role\": \"protocol\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/incident")
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 \"chain\": \"ethereum\",\n \"exploit_tx\": \"<string>\",\n \"victim\": \"<string>\",\n \"addresses\": [\n \"<string>\"\n ],\n \"addresses_source\": \"<string>\",\n \"hops\": 2,\n \"fanout\": 4,\n \"since\": 0,\n \"window_days\": 123,\n \"max_credits\": 200,\n \"name\": \"<string>\",\n \"watch\": {\n \"create\": true,\n \"follow_hops\": true,\n \"shared\": false\n },\n \"protocol_addresses\": [\n {\n \"address\": \"<string>\",\n \"source\": \"<string>\",\n \"role\": \"protocol\"\n }\n ]\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>"
}{
"error": "source_unavailable",
"detail": "<string>",
"source": "<string>",
"reason": "<string>",
"retryable": true,
"chain": "<string>",
"primitive": "<string>",
"operation": "<string>",
"target": "<string>",
"http_status": 123,
"retry_after": 123,
"upstream_message": "<string>",
"source_fault": true,
"failure_cause": "<string>"
}Autorizaciones
Encabezados
Caso activo (opcional): el token de un caso que podés ver. La consulta queda en el registro de actividad de ese caso y resuelve también sus labels propias. Un caso que no existe, se borró o ya no está compartido con vos da 400 case_unavailable y la consulta no se hace (sin cobro).
Cuerpo
Respuesta
Successful Response