Balance
Get the balance of a specific ZRC2 token for a given wallet.
Parameters
Name | Type | Required | Description |
---|---|---|---|
wallet |
String | Required | Wallet address holding the token |
token |
String | Required | Contract address of the ZRC2 token |
Example Request
Query
query UserBalance($input: WalletBalanceInput) {
getUserBalanceByToken(input: $input) {
tokenAddress
walletAddress
lastBlockID
amount
}
}
Query Variables
{
"input": {
"wallet": "0x22b251cc155ac0a181a156aaec74e964a82011c1",
"token": "0x98a71b463a33bbff650d123bf04f1f32d1c8b508"
}
}
HTTP Headers
{
"Authorization": "Bearer <insert token>"
}
Example Response
{
"data": {
"getUserBalanceByToken": {
"tokenAddress": "0x98a71b463a33bbff650d123bf04f1f32d1c8b508",
"walletAddress": "0x22b251cc155ac0a181a156aaec74e964a82011c1",
"lastBlockID": "4734719",
"amount": "100000000000000"
}
}
}