Native Token Balances
In the following examples, we're going to use the GetNativeTokenBalance
method from Sequence Indexer Gateway.
GetNativeTokenBalance
- Request: POST /rpc/IndexerGateway/GetNativeTokenBalance
- 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.accountAddress
(string) -- the wallet account address
These examples are based on the Native network balances example for Indexer.
Fetch all native balances from all chains at once
Example: Get the native balances of an account address across all chains with a single query
Curl
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Access-Key: AQAAAAAAAF_JvPALhBthL7VGn6jV0YDqaFY" \
https://indexer.sequence.app/rpc/IndexerGateway/GetNativeTokenBalance \
-d '{
"accountAddress": "0x8e3E38fe7367dd3b52D1e281E4e8400447C8d8B9"
}'