Skip to main content

Balance

Queries the amount of CW20 tokens held by the specified user for the specified address and chain.

query Cw($contract: String!, $chainUid: String!, $address: String!) {
cw(contract: $contract, chain_uid: $chainUid) {
balance(address: $address) {
balance
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://api.euclidprotocol.com/graphql' \
--data '{"query":"query Cw($contract: String!, $chainUid: String!) {\n cw(contract: $contract, chain_uid: $chainUid) {\n token_info {\n name\n symbol\n decimals\n total_supply\n }\n }\n}","variables":{"contract":"nibi16wdq5rux5p2fd7kyv2fq0yxus7z3axtm509w6f97fs0an9lemmdstzg69p","chainUid":"nibiru"}}'

Open in Playground

Return Fields

FieldTypeDescription
BalanceStringThe number of LP tokens held by the user.