Skip to main content

Balance

Queries the the balance information for a token on the spcified chain. Only for voucher tokens.

query Vcoin($balanceKey: BalanceKeyInput) {
vcoin {
balance(balance_key: $balanceKey) {
amount
}
}
}

Example​

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

Open in Playground

Arguments​

ArgumentTypeDescription
balanceKeyBalanceKeyInputThe input key for the balance query. Includes the user address, chain UID, and token ID.

Return Fields​

FieldTypeDescription
amountStringThe amount of virtual tokens in the balance for the specified user.