curl --request GET \
--url https://app.blockgence.com/v1/approvals/{chain}/{addr} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.blockgence.com/v1/approvals/{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/approvals/{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/approvals/{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/approvals/{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/approvals/{chain}/{addr}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/approvals/{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>"
}Permissions granted by an address
Returns each permission an address granted over its tokens, which ones are still open today, how much each
spender can move and when and how each one was granted. It covers ERC-20 approve, NFT approve by tokenId
(ERC-721), collection setApprovalForAll (ERC-721 and ERC-1155) and Permit2. blockgence does not revoke or sign
anything: the query is read-only.
The current state is read on-chain at a fixed block (state_block), not reconstructed from events.
Main fields of each permission in permissions[]:
kind:erc20,permit2,erc721oroperator.state:open,closed,expired(expired Permit2),unverified(could not be read: it does not mean closed) ornot_checked.current: the allowance and balance read, withunlimited.exposure: what the spender can move today, with its USD value at the current price if a price is available.granted: the last grant and how it was made (via:approve,owner_tx,permit_signature,owner_contract_call,permit2_signature,permit2_approveand others). Up to 40 transactions are analyzed per request.spender: its address, its label and its account type.hints: leads about an open permission (spender_labeled,open_to_eoa,unlimited,signed_permit), each with its reason. No spender is declared a drainer without a source that says so.
summary summarizes the totals, coverage states what was read (each search returns up to 10,000 events) and
methodology cites the entries that support the response.
Availability: on some networks the full history is not available. There, a request without a window returns
503 source_unavailable with reason: not_configured, with no charge, and the message states from which
from_block it can be requested; with a short window, the response comes with
coverage.route.status: degraded. Which reads each network offers is available at GET /v1/chains.
Errors: if the permission search fails, the response is 503, because without it the result would say “no
permissions”. Other failures are declared in degraded_sources and leave the data unverified, never closed.
Cost: 10 credits base. Some operations charge less when they reuse a saved result; never more.
curl --request GET \
--url https://app.blockgence.com/v1/approvals/{chain}/{addr} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.blockgence.com/v1/approvals/{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/approvals/{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/approvals/{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/approvals/{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/approvals/{chain}/{addr}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/approvals/{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>"
}Authorizations
Headers
Path Parameters
Query Parameters
Response
The permissions of the address, with their state, exposure and origin.