curl --request POST \
--url https://app.blockgence.com/v1/counterparties \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "<string>",
"chain": "ethereum",
"direction": "both",
"since": 0,
"temporal": true,
"win_start": 0,
"win_end": 0,
"min_usd": 1,
"offset": 0,
"limit": 20,
"include_tokens": true,
"read_more": 0,
"until": 0
}
'import requests
url = "https://app.blockgence.com/v1/counterparties"
payload = {
"address": "<string>",
"chain": "ethereum",
"direction": "both",
"since": 0,
"temporal": True,
"win_start": 0,
"win_end": 0,
"min_usd": 1,
"offset": 0,
"limit": 20,
"include_tokens": True,
"read_more": 0,
"until": 0
}
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',
direction: 'both',
since: 0,
temporal: true,
win_start: 0,
win_end: 0,
min_usd: 1,
offset: 0,
limit: 20,
include_tokens: true,
read_more: 0,
until: 0
})
};
fetch('https://app.blockgence.com/v1/counterparties', 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/counterparties",
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',
'direction' => 'both',
'since' => 0,
'temporal' => true,
'win_start' => 0,
'win_end' => 0,
'min_usd' => 1,
'offset' => 0,
'limit' => 20,
'include_tokens' => true,
'read_more' => 0,
'until' => 0
]),
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/counterparties"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"direction\": \"both\",\n \"since\": 0,\n \"temporal\": true,\n \"win_start\": 0,\n \"win_end\": 0,\n \"min_usd\": 1,\n \"offset\": 0,\n \"limit\": 20,\n \"include_tokens\": true,\n \"read_more\": 0,\n \"until\": 0\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/counterparties")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"direction\": \"both\",\n \"since\": 0,\n \"temporal\": true,\n \"win_start\": 0,\n \"win_end\": 0,\n \"min_usd\": 1,\n \"offset\": 0,\n \"limit\": 20,\n \"include_tokens\": true,\n \"read_more\": 0,\n \"until\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/counterparties")
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 \"direction\": \"both\",\n \"since\": 0,\n \"temporal\": true,\n \"win_start\": 0,\n \"win_end\": 0,\n \"min_usd\": 1,\n \"offset\": 0,\n \"limit\": 20,\n \"include_tokens\": true,\n \"read_more\": 0,\n \"until\": 0\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>"
}Todas las contrapartes de una dirección
Devuelve todas las contrapartes de una dirección, agregadas, etiquetadas y paginadas, ordenadas por valor en USD.
A diferencia de POST /v1/trace, que limita las ramas por nodo, aquí aparecen también las contrapartes que el
rastreo dejó fuera (el «+N» de un nodo).
Cuerpo del pedido (JSON).
address(obligatorio) ychain(por defectoethereum).direction:out(a quién envió),in(quién le envió) oboth(por defecto).sinceyuntil: piso y techo temporal, en segundos Unix; 0 significa sin límite.temporal(por defectotrue) aplica la consistencia temporal.win_startywin_end: ventana de fechas.include_tokens(por defectotrue) yread_more(de 0 a 9): leer la dirección igual que su nodo del rastreo. Un nodo del grafo publica estos valores enreveal.min_usd: descarta las contrapartes de menos de ese valor en USD (por defecto 1.0). Las contrapartes relevantes (exchange, mezclador, bridge, sancionada o estafa) se conservan aunque el valor sea menor.offset(por defecto 0) ylimit(de 1 a 100, por defecto 20): paginación.
Respuesta. total, offset, returned, has_more, next_offset y counterparties (cada una con
address, label, category, direction, value, value_usd, asset, tx_count, first_ts y
last_ts). Para recorrer todas, pida offset = next_offset hasta que has_more sea false. unpriced resume
las transferencias de tokens descartadas por no tener precio publicado; una contraparte que solo movió esos
tokens no figura en la lista.
Límites. De lo leído se agregan como máximo las 10,000 transferencias de mayor valor del lado pedido.
Cobertura. Si la fuente no puede leer la dirección, la respuesta es 503 source_unavailable, sin cobro:
nunca «0 contrapartes». Lo que quedó sin leer y los límites de la red se declaran en degraded_sources. En una
red donde no se pueden leer las entradas, direction: "in" responde 503 con reason: "unsupported".
Costo: 4 créditos de base. Algunas operaciones cobran menos si reutilizan un resultado guardado; nunca más.
curl --request POST \
--url https://app.blockgence.com/v1/counterparties \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "<string>",
"chain": "ethereum",
"direction": "both",
"since": 0,
"temporal": true,
"win_start": 0,
"win_end": 0,
"min_usd": 1,
"offset": 0,
"limit": 20,
"include_tokens": true,
"read_more": 0,
"until": 0
}
'import requests
url = "https://app.blockgence.com/v1/counterparties"
payload = {
"address": "<string>",
"chain": "ethereum",
"direction": "both",
"since": 0,
"temporal": True,
"win_start": 0,
"win_end": 0,
"min_usd": 1,
"offset": 0,
"limit": 20,
"include_tokens": True,
"read_more": 0,
"until": 0
}
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',
direction: 'both',
since: 0,
temporal: true,
win_start: 0,
win_end: 0,
min_usd: 1,
offset: 0,
limit: 20,
include_tokens: true,
read_more: 0,
until: 0
})
};
fetch('https://app.blockgence.com/v1/counterparties', 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/counterparties",
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',
'direction' => 'both',
'since' => 0,
'temporal' => true,
'win_start' => 0,
'win_end' => 0,
'min_usd' => 1,
'offset' => 0,
'limit' => 20,
'include_tokens' => true,
'read_more' => 0,
'until' => 0
]),
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/counterparties"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"direction\": \"both\",\n \"since\": 0,\n \"temporal\": true,\n \"win_start\": 0,\n \"win_end\": 0,\n \"min_usd\": 1,\n \"offset\": 0,\n \"limit\": 20,\n \"include_tokens\": true,\n \"read_more\": 0,\n \"until\": 0\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/counterparties")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"chain\": \"ethereum\",\n \"direction\": \"both\",\n \"since\": 0,\n \"temporal\": true,\n \"win_start\": 0,\n \"win_end\": 0,\n \"min_usd\": 1,\n \"offset\": 0,\n \"limit\": 20,\n \"include_tokens\": true,\n \"read_more\": 0,\n \"until\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/counterparties")
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 \"direction\": \"both\",\n \"since\": 0,\n \"temporal\": true,\n \"win_start\": 0,\n \"win_end\": 0,\n \"min_usd\": 1,\n \"offset\": 0,\n \"limit\": 20,\n \"include_tokens\": true,\n \"read_more\": 0,\n \"until\": 0\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
Cuerpo
Todas las contrapartes de UNA address, agregadas y paginadas. A diferencia del trace (capado por fan-out), acá se ve el universo completo de contrapartes (hasta lo que trae la fuente de datos), para revelar las que el rastreo dejó afuera.
Respuesta
Respuesta correcta.