getWalletTokenBalances
Parameters
walletAddress
:(string)
REQUIRED - The address of the walletcontractAddress[]
:(array[string])
OPTIONAL - The address of the contractpageSize
:(integer)
OPTIONAL - Number of records to be retrieved on one pagepageKey
:(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 walletcount
:<integer>
- The number of allowancesnextPageKey
:<string>
- Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous responseallowances
:<array>
- The array of Allowance objectscontractAddress
:<string>
- The token contract addresscontractDecimals
:<string>
- Token decimals specified in the contractcontractName
:<string>
- The name of the tokencontractSymbols
:<string>
- The name of the tokenspenderAddress
:<string>
- The address of the spenderallowance
:<string>
- The amount allowed for spendingwalletBalance
:<string>
- The balance of tokens for wallet creating the allowanceblockHash
:<string>
- The hash of the blockblockTimestamp
:<string>
- The timestamp of the blocktransactionHash
:<string>
- The hash of the transactiontransactionIndex
:<integer>
- The number of the transactionlogIndex
:<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
}
]
}