User Balance
Queries the 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://testnet.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":"nibi1...","chain_uid":"nibiru"}}}'
- user (CrossChainUserInput): The input specifying the user for the balance query by specifying the user address and chain UID.
Return Fields
Field | Type | Description |
---|---|---|
amount | String | The amount of tokens in the user's balance. |
token_id | String | The identifier of the token. |