Skip to main content

Unified User Balance

Queries the unified virtual token balances for a user across multiple chains.

query Unified_user_balance($address: String!, $limit: Int, $offset: Int, $chainUids: [String]) {
vcoin {
unified_user_balance(address: $address, limit: $limit, offset: $offset, chain_uids: $chainUids) {
balances {
amount
token_id
}
chain_uid
}
}
}

Example

curl --request POST \
    --header 'content-type: application/json' \
    --url 'https://api.euclidprotocol.com/graphql' \
    --data '{"query":"query Unified_user_balance($address: String!, $limit: Int, $offset: Int, $chainUids: [String]) {\n  vcoin {\n    unified_user_balance(address: $address, limit: $limit, offset: $offset, chain_uids: $chainUids) {\n      balances {\n        amount\n        token_id\n      }\n      chain_uid\n    }\n  }\n}","variables":{"address":"0x887e4aac216674d2c432798f851c1ea5d505b2e1","limit":2,"offset":1,"chainUids":null}}'

Open in Playground

Arguments

ArgumentTypeDescription
addressString!The user address to query balances for.
limitIntOptional limit for pagination.
offsetIntOptional offset for pagination.
chainUids[String]Optional list of chain UIDs to filter results.

Return Fields

FieldTypeDescription
idID!Globally unique identifier for the balance response item.
chain_uidString!The chain UID for the returned balances.
balancesVcoinBalanceUserResponse[]List of token balances for the chain.

VcoinBalanceUserResponse

FieldTypeDescription
idID!Globally unique identifier for the token balance item.
amountStringThe amount of the token in the user's balance.
token_idStringThe identifier of the token.