listContractAssetBalances Query
Parameters
filter
object
REQUIRED
The filter object used to query balances
contract
string
REQUIRED
The contract address whose asset balances is to be fetched
Returns
data
object
The data object which contains the following fields:
contractBalances
object
The object containing details about the contract's balance for a specific asset
nodes
array
An array of balance records for different assets
amount
string
The balance amount of the specified asset in the contract
assetId
string
The unique identifier of the asset associated with the balance
Request
1curl --location 'https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql' \2--header 'Accept: application/json' \3--header 'Content-Type: application/json' \4--data '{5"query": "query ContractBalances($filter: ContractBalanceFilterInput!) { contractBalances(filter: $filter, first: 5) { nodes { amount assetId } } }",6"variables": {7"filter": {8"contract": "0x7777777777777777777777777777777777777777777777777777777777777777"9}10}11}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free