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://testnet.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":"nibi1...","chain_uid":"nibiru"},"token_id":"nibi"}}}'

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.