v1

latestOpenAPI 3.0.02026-07-22243670.8 KB
Token

Get the on-chain ERC-20 allowance for a token, owner and spender

Reads allowance(owner, spender) on the ERC-20 token contract. Can be used to determine whether an approval transaction is needed before a swap or token sale.

get/v1/token/allowance

Query parameters

token_addressstring required
Example:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

The ERC-20 token contract address

ownerstring required
Example:0x8ba1f109551bd432803012645ac136ddd64dba72

The address owning the tokens

spenderstring required
Example:0x742d35cc6634c0532925a3b844bc9e7595f0beb1

The address allowed to spend the tokens

chainstring required
Example:ethereum_sepolia

The EVM chain to read from, e.g. ethereum_mainnet, ethereum_sepolia, base_mainnet or base_sepolia

Response

Successful response.

allowancestring required

The allowance as a uint256 decimal string in the token's smallest unit

object'token_allowance' required

String representing the object's type. Objects of the same type share the same value.

Example response

{
  "allowance": "1000000"
}