Get Token Balance
getTokenBalancesRetrieve the balance of any VIP-180/ERC-20 token for a wallet address by querying the smart contract directly. Returns raw and formatted balances, decimals, and token metadata.
Instructions
Get the balance of any VIP-180/ERC-20 token for a wallet address by querying the smart contract directly. Returns the raw balance (smallest unit), formatted balance (human-readable), decimals, and token metadata (symbol, name) if available. Requires the token contract address.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"address": "<address>",
"tokenAddress": "<tokenAddress>"
},
"name": "getTokenBalances"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Wallet address or VNS name to check token balance for | |
| tokenAddress | Yes | Token contract address (VIP-180/ERC-20) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| balance | No | ||
| network | Yes | ||
| walletAddress | No | Resolved wallet address |