Patrimonio de una dirección a una fecha
curl --request GET \
--url https://app.blockgence.com/v1/holdings/{chain}/{addr} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.blockgence.com/v1/holdings/{chain}/{addr}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.blockgence.com/v1/holdings/{chain}/{addr}', 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/holdings/{chain}/{addr}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://app.blockgence.com/v1/holdings/{chain}/{addr}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.blockgence.com/v1/holdings/{chain}/{addr}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/holdings/{chain}/{addr}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
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>"
}Incidentes
Patrimonio de una dirección a una fecha
Devuelve los saldos de una dirección a un bloque de corte (la moneda nativa y los tokens, con precio a esa
fecha), cuánto de eso sigue hoy en la dirección y cuánto está en tokens cuyo emisor puede congelarlos. El corte
se indica con uno solo de block, ts o date; ninguno, dos a la vez o un corte futuro responden 400.
La respuesta incluye:
as_of: el bloque y la fecha del corte, y si el estado se pudo leer (state_read,why_not_read);assets: por activo, el saldo de entonces (then), el de hoy (now),still_there_upper_boundyfreezable;totals:then_usd_at_least,still_there_usd_upper_bound,recoverable_usd_upper_bound,already_frozenythen_unpriced;recoverable: los tokens congelables, con su estado actual ante el emisor;sample: qué tokens se evaluaron.
Cómo leer los valores:
then_usd_at_leastes un mínimo: la lista de tokens es una muestra (los que la dirección movió hasta el corte y tienen precio publicado, más la moneda nativa y los tokens congelables de la red). Un activo sin precio no cuenta como cero: va enthen_unpriced.- Lo que sigue en la dirección es una cota superior: los tokens son fungibles y la dirección pudo vaciarse y volver a recibir.
- Lo recuperable es una posibilidad técnica, no una promesa: congelar depende del emisor, de su política y, en general, del pedido de una autoridad.
- En algunas redes, o para bloques antiguos, el saldo histórico no se puede leer. Entonces
as_of.state_readesfalse,why_not_readda el motivo y los valores de entonces salennull, no cero. Nunca se completan con el saldo actual.
Solo redes EVM; una red que no es EVM o una dirección inválida responden 400.
Costo: 10 créditos de base. Algunas operaciones cobran menos si reutilizan un resultado guardado; nunca más.
GET
/
v1
/
holdings
/
{chain}
/
{addr}
Patrimonio de una dirección a una fecha
curl --request GET \
--url https://app.blockgence.com/v1/holdings/{chain}/{addr} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.blockgence.com/v1/holdings/{chain}/{addr}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.blockgence.com/v1/holdings/{chain}/{addr}', 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/holdings/{chain}/{addr}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://app.blockgence.com/v1/holdings/{chain}/{addr}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.blockgence.com/v1/holdings/{chain}/{addr}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/holdings/{chain}/{addr}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
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
APIKeyHeaderBearerAuth
Encabezados
Parámetros de ruta
Parámetros de consulta
Respuesta
Respuesta correcta.