Skip to main content

getWalletTokenAllowances

Parameters

  • walletAddress :(string) REQUIRED - The address of the wallet
  • contractAddress: (string) OPTIONAL - The address of the spender
  • pageSize : (integer) OPTIONAL - Number of records to be retrieved on one page
  • pageKey : (string) OPTIONAL - Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response

Returns

  • walletAddress: <string> - The address of the wallet
  • count : <integer> - The number of allowances
  • nextPageKey: <string> - Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response
  • allowances: <array> - The array of Allowance objects
    • contractAddress: <string> - The token contract address
    • contractDecimals : <string> - Token decimals specified in the contract
    • contractName: <string> - The name of the token
    • contractSymbols: <string> - The name of the token
    • spenderAddress : <string> - The address of the spender
    • allowance: <string> - The amount allowed for spending
    • walletBalance: <string> - The balance of tokens for wallet creating the allowance
    • blockHash : <string> - The hash of the block
    • blockTimestamp : <string> - The timestamp of the block
    • transactionHash: <string>- The hash of the transaction
    • transactionIndex: <integer> - The number of the transaction
    • logIndex : <integer> - The index of the log

Example Request and Result for getWalletTokenAllowances

Request

curl --location 'https://eth-mainnet.blastapi.io/<project-id>/builder/getWalletTokenAllowances?walletAddress=0x78975E7AC0E6E247Af053a2df28B89dE67351A67'

Result

{
"walletAddress": "0x78975e7ac0e6e247af053a2df28b89de67351a67",
"count": 1,
"tokenAllowances": [
{
"contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"contractDecimals": "6",
"contractName": "Tether USD",
"contractSymbol": "USDT",
"spenderAddress": "0xfb181a48b102580539b9b8aca6b1617ef0c80bf8",
"allowance": "2000000",
"walletBalance": "2773449",
"blockHash": "0xae7455086b9f56ec6c1c084eff817ffd5fc39e21c1f707596fb1dd43fbdde1d1",
"blockNumber": 18190548,
"blockTimestamp": "2023-09-22T09:39:23.000Z",
"transactionHash": "0xe2e57d9dd3f69065b92a17d63321785c7600dd632560c80adf42110ea7903d6e",
"transactionIndex": 72,
"logIndex": 1178
}
]
}