Skip to main content

User Balance

Queries the virtual token balance of the specified user address on the specified chain.

query Vcoin($user: CrossChainUserInput) {
vcoin {
user_balance(user: $user) {
balances {
amount
token_id
}
}
}
}

Example​

curl --request POST \
    --header 'content-type: application/json' \
    --url 'https://api.euclidprotocol.com/graphql' \
    --data '{"query":"query Vcoin($user: CrossChainUserInput) {\n  vcoin {\n    user_balance(user: $user) {\n      balances {\n        amount\n        token_id\n      }\n    }\n  }\n}","variables":{"user":{"address":"0x887e4aac216674d2c432798f851c1ea5d505b2e1","chain_uid":"ronin"}}}'

Open in Playground

Arguments​

ArgumentTypeDescription
userCrossChainUserInputThe input specifying the user for the balance query by providing the address and chain UID.

Return Fields​

FieldTypeDescription
amountStringThe amount of tokens in the user's balance.
token_idStringThe identifier of the token.