Token API

Get wallet token balances across chains

Returns the total native + ERC-20 balance of a wallet across one or more supported EVM chains, with USD valuations computed by Ankr's pricing service. Each asset includes contract address, decimals, raw integer balance, and a normalized human-readable balance.

Pass walletAddress (hex address, or ENS name on Ethereum). Scope to specific chains with the blockchain array, or omit it to query all supported chains. Filter by onlyWhitelisted: true (default) to limit results to tokens indexed on CoinGecko, or set to false for the full ERC-20 inventory the wallet has touched.

Pagination via pageSize + pageToken. The endpoint is part of the Token API product (700 compute units per call, $0.00007 at base rate).

post/?ankr_getAccountBalance

Request

Request body

idinteger required

Client-supplied request ID echoed in the response.

jsonrpc'2.0' required
method'ankr_getAccountBalance' required

Example request

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "ankr_getAccountBalance",
  "params": {
    "walletAddress": "0x18b2a687610328590bc8f2e5fedde3b582a49cda",
    "blockchain": [
      "eth",
      "bsc",
      "polygon"
    ]
  }
}

Response

Success. JSON-RPC result envelope contains the asset list, total USD valuation, and total count. Note: JSON-RPC errors (e.g. -32602 invalid params) are also returned with HTTP 200 — clients must check for error in the response body.

idinteger required
jsonrpc'2.0' required

Changes

No recorded changes to this operation across all 1 revision of this API.