Balance
Get the ZIL balance oof a wallet.
Parameters
Name | Type | Required | Description |
---|---|---|---|
wallet |
String | Required | Wallet address holding the token |
token |
String | Required | Use zero address for native ZIL |
Example Request
Query
query UserBalance($input: WalletBalanceInput) {
getUserBalanceByToken(input: $input) {
tokenAddress
walletAddress
lastBlockID
amount
}
}
Query Variables
{
"input": {
"wallet": "0x22b251cc155ac0a181a156aaec74e964a82011c1",
"token": "0x0000000000000000000000000000000000000000"
}
}
HTTP Headers
{
"Authorization": "Bearer <insert token>"
}
Example Response
{
"data": {
"getUserBalanceByToken": {
"tokenAddress": "0x0000000000000000000000000000000000000000",
"walletAddress": "0x22b251cc155ac0a181a156aaec74e964a82011c1",
"lastBlockID": "2513226",
"amount": "2226027441580000"
}
}
}