Examples
Fetch token balances from specific contracts across all networks.
This content provides instructions on fetching token balances from specific contracts.
Balance Updates API
In the following examples, we’re going to use the GetTokenBalancesByContract
API.
GetTokenBalancesByContract
- Request: POST /rpc/IndexerGateway/GetTokenBalancesByContract
- Content-Type: application/json
- Body (in JSON):
chainIds
([]int - optional) — return results only for the chains that match the given ID.networks
([]string - optional) — return results only for the chains that match the given names.filter
(object) —contractAddresses
accountAddresses
contractStatus
omitMetadata
(boolean - optional - default: false)
Get the USDC balances
Example: Retrieve USDC token balances for a specific account (
0xd8da6bf26964af9d7eed9e03e53415d37aa96045
) across multiple networks
- USDC on Mainnet
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
- USDC on Polygon
0x3c499c542cef5e3811e1192ce70d8cc03d5c3359
- USDC on BSC
0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d
Was this page helpful?