An EVM address's token approvals
https://api.bittensor.ai/api/v2/evm/addresses/{h160}/approvals- Status
- Beta
- Auth
- API key or OAuth access token
- Scope
data:read- Rate limit
plan
The approvals the address.
Full description
The approvals the address (as owner) has given: per token, kind, spender and id, the newest one, "last approved" (an ERC-20 allowance's remaining amount is not known: transferFrom spends it without an event), with its status (approved, revoked, or cleared_by_transfer for an ERC-721 id that moved since) and is_unlimited (exactly 2^256 - 1). kind / is_approval_for_all tell an ERC-20 amount (erc20), one ERC-721 id (erc721, with token_id) and a whole collection (for_all: ApprovalForAll, token_id null) apart. status filters (default approved; all for every status); keyset-paged (up to 500 a page). include=history adds data.history: the owner's Approval / ApprovalForAll events, newest first, paged on their own (history_limit, history_cursor, meta.history_page). Amounts are raw integer strings (*_raw, unit token_raw): divide by 10^decimals of their token. Balances, holders, supply, NFT owners and approvals are as of meta.computed_through_height (the token ledger's top); meta.at is the source's head, meta.coverage the dataset's range. Cached as the head (the token ledger advances with every block). Errors are application/problem+json: INVALID_ADDRESS, INVALID_STATUS, INVALID_INCLUDE, INVALID_LIMIT, INVALID_CURSOR, INVALID_PARAMETER (history_limit / history_cursor without include=history), UNKNOWN_PARAMETER, SOURCE_TIMEOUT (503), SOURCE_NOT_READY (503: this deployment's data source is not configured, or does not have the EVM token views yet).
Beta: this route may change with one release's notice in the v2 changelog; additive changes need none (x-stability: beta).
Path parameters
- h160path, required· string
The EVM address, 0x + 40 hex (any case).
Query parameters
- statusquery· enum · one of approved, revoked, cleared_by_transfer, all · default approved
Only approvals in this status:
approved(the default: those in force),revoked,cleared_by_transfer, orall. Anything else is a 400INVALID_STATUS.- includequery· string
historyaddsdata.history. Anything else is a 400INVALID_INCLUDE.- limitquery· integer · default 100 · 1 to 500
Approvals per page, 1..500 (default 100). Anything else is a 400
INVALID_LIMIT.- cursorquery· string · up to 400 characters
meta.page.next_cursorof the previous page, passed back unchanged with the same other parameters. It is opaque and bound to them: a cursor used with different parameters, or altered, is a 400INVALID_CURSOR.- history_limitquery· integer · 1 to 100
With
include=history: events per page, 1..100 (default 25). Anything else is a 400INVALID_LIMIT.- history_cursorquery· string · up to 400 characters
With
include=history:meta.history_page.next_cursorof the previous answer (bound to the address; altered or foreign: 400INVALID_CURSOR).
Response
data is an object with these fields. Amounts are integer strings in their base unit, and null means unknown, never zero (see Units and formats). meta.at names the block the answer was read at.
The current approvals, and the history when included.
- allowancesarray of objects
The current approvals, by token, kind, spender and id.
[]when none.14 fields in allowances (each item)
- tokenstring
The token contract, 0x H160.
- Format: EVM address: 0x and 40 hex digits
- kindstring
erc20(an Approval with a value),erc721(an Approval of one id) orfor_all(ApprovalForAll: every id). New values may be added; show an unknown value as is (or generically).- is_approval_for_allboolean
True for an ApprovalForAll (
kindfor_all): the operator may move every id of the collection (token_idnull). False for one ERC-721 id (kinderc721,token_idset) or an ERC-20 amount.- spenderstring
The spender (erc20), the approved address (erc721) or the operator (for_all), 0x H160.
- Format: EVM address: 0x and 40 hex digits
- token_idstring · unit id · can be null
erc721: the id; null otherwise.
- Format: whole number, as a string
- value_rawstring · unit token_raw (÷10^decimals) · can be null
erc20: the last approved value, raw units. Not the remaining allowance:
transferFromspends it without an event. Null for erc721 / for_all.- Format: whole number, as a string
- approvedboolean · can be null
for_all: granted (true) or revoked; null otherwise.
- is_unlimitedboolean
value_rawis exactly 2^256 - 1 (an unlimited approval). Any other value, however large, is false.- statusstring
approved(in force as last set),revoked(set to 0 / 0x0 / false) orcleared_by_transfer(erc721: the id moved after the approval, which clears it). New values may be added; show an unknown value as is (or generically).- heightinteger · unit block
The approval's block.
- event_indexinteger · unit id
The approval's event index.
- namestring · can be null
The token's
name()as the contract returns it (attacker-controlled text: render it as text, never as markup). Null when it has none.- symbolstring · can be null
The token's
symbol()as the contract returns it (attacker-controlled text). Null when it has none.- decimalsinteger · unit count · can be null
The token's
decimals()(the metadata feed): divide its*_rawamounts by 10^decimals. Null: unknown.
- historyarray of objects · optional
Only with
include=history: the owner's approval events, newest first.14 fields in history (each item)
- heightinteger · unit block
The block.
- event_indexinteger · unit id
The log's event index.
- evm_indexinteger · unit id · can be null
The EVM transaction's index; null for a pallet_evm
EVM.calllog.- tx_hashstring · can be null
The EVM transaction, 0x + 64 hex; null for an
EVM.calllog.- Format: 32-byte hex: 0x and 64 hex digits
- tokenstring
The token contract, 0x H160.
- Format: EVM address: 0x and 40 hex digits
- kindstring
erc20(an Approval with a value),erc721(an Approval of one id) orfor_all(ApprovalForAll: every id). New values may be added; show an unknown value as is (or generically).- is_approval_for_allboolean
True for an ApprovalForAll (
kindfor_all): the operator may move every id of the collection (token_idnull). False for one ERC-721 id (kinderc721,token_idset) or an ERC-20 amount.- ownerstring
The approving owner, 0x H160.
- Format: EVM address: 0x and 40 hex digits
- spenderstring
The spender / approved address / operator, 0x H160 (0x0 = cleared).
- Format: EVM address: 0x and 40 hex digits
- token_idstring · unit id · can be null
erc721: the id; null otherwise.
- Format: whole number, as a string
- value_rawstring · unit token_raw (÷10^decimals) · can be null
erc20: the approved value, raw units; null otherwise.
- Format: whole number, as a string
- approvedboolean · can be null
for_all: granted (true) or revoked; null otherwise.
- is_unlimitedboolean
value_rawis exactly 2^256 - 1 (an unlimited approval). Any other value, however large, is false.- block_timestring (date-time) · can be null
The block's time, RFC 3339 UTC.
- Format: date and time, ISO 8601 in UTC
Response headers
10 headers: ETag, Cache-Control, CDN-Cache-Control, X-BTAI-Stale, X-BTAI-Stale-As-Of, RateLimit-Policy, RateLimit, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
- ETag
Strong validator of this answer. Send it back as
If-None-Match: an unchanged answer is a 304 Not Modified without a body. A settled answer's validator leaves the chain head out, so it stays valid as the head moves.- Cache-Control
One of three classes: settled
public, max-age=3600, stale-while-revalidate=86400(pinned to a block that cannot move), slowpublic, max-age=300, stale-while-revalidate=600(state that moves in minutes or days) or tippublic, max-age=6, stale-while-revalidate=12(follows the chain head); the label routes are cached until the next nightly copy (public, max-age=<seconds>, stale-while-revalidate=60). Neverimmutable.no-storeon an earlier answer served because the data source failed (X-BTAI-Stale).- CDN-Cache-Control
The same class for shared caches (RFC 9213; browsers ignore it): settled 24 h, slow 300 s, tip 6 s, each with
stale-while-revalidateandstale-if-error;no-storewithX-BTAI-Stale.- X-BTAI-Stale
Present only when the data source failed to answer (it timed out or was unavailable) and an earlier answer to the same request is served instead of a 503 (stale if error, RFC 5861). Then
if-error, withX-BTAI-Stale-As-Of,Age(its seconds since then) andWarning: 110 - "Response is Stale", andCache-Control: no-store: the answer is never kept as fresh, and a later request reads again. Prices and quotes are never served this way.- X-BTAI-Stale-As-Of
With
X-BTAI-Stale: when the earlier answer served was produced, an RFC 3339 UTC time (2026-10-21T12:00:00Z).- RateLimit-Policy
The tier's request quota of the current window (IETF draft), e.g.
"tier";q=600.- RateLimit
Requests left in the current window and the seconds until it resets (IETF draft), e.g.
"tier";r=597;t=42.- X-RateLimit-Limit
The tier's request quota of the current window.
- X-RateLimit-Remaining
Requests left in the current window.
- X-RateLimit-Reset
When the current window resets, Unix seconds.
Status codes
200 · 304 · 400 · 401 · 402 · 403 · 404 · 429 · 500 · 502 · 503
304 Not Modified: the If-None-Match validator still matches; no body.
Error codes
The codes this endpoint can return. Each links to what it means and what to do.
- AMBIGUOUS_CREDENTIALS
- BAD_GATEWAY
- BILLING_UNAVAILABLE
- BUDGET_EXCEEDED
- CONCURRENCY_LIMIT
- INSUFFICIENT_PERMISSIONS
- INTERNAL_ERROR
- INVALID_ADDRESS
- INVALID_CURSOR
- INVALID_INCLUDE
- INVALID_LIMIT
- INVALID_PARAMETER
- INVALID_STATUS
- PAYMENT_REQUIRED
- PLAN_REQUIRED
- RATE_LIMITED
- REPEATED_PARAMETER
- SERVICE_UNAVAILABLE
- SOURCE_BUSY
- SOURCE_NOT_READY
- SOURCE_TIMEOUT
- UNAUTHORIZED
- UNKNOWN_PARAMETER
- VALIDATION_ERROR
From the API's published specification, version 1.165.0.