Token API Overview

Token API is the Advanced API method group for token-related data across supported chains. Use it when your application needs normalized balances, currency lists, token prices, token holders, or holder counts without maintaining token-specific indexing pipelines.

Token API usecases: best suited for wallets, portfolio dashboards, token pages, analytics tools, and backend services that need token data in a consistent response model.


What You Can Build

Token API supports common token-data workflows used by production applications:

  • Show account balances: retrieve token balances for a wallet address across supported assets.
  • Price token holdings: fetch current token price data for portfolio values and token detail pages.
  • List supported currencies: retrieve currencies available for a supported blockchain.
  • Analyze holder data: retrieve token holders or holder counts for market, community, or reporting workflows.

Request Model

Token API uses JSON-RPC 2.0 over the Advanced API multichain HTTPS endpoint. A request includes the endpoint URL, method name, params object, and JSON-RPC metadata:

1{
2 "jsonrpc": "2.0",
3 "method": "ankr_getTokenPrice",
4 "params": {
5 "blockchain": "eth",
6 "contractAddress": "0x990f341946a3fdb507ae7e52d17851b87168017c"
7 },
8 "id": 1
9}

Successful responses include a result object. Failed responses include an error object with details, so clients should inspect the response body before treating a request as successful.


Methods

  • ankr_getAccountBalance: retrieves token balances for a wallet address. Use it to build portfolio views, wallet summaries, and account-level balance checks.
  • ankr_getCurrencies: retrieves currencies supported for a blockchain. Use it to populate token selectors, supported asset lists, or chain-specific currency metadata.
  • ankr_getTokenHolders: retrieves holders for a token contract. Use it to analyze holder distribution or power holder-focused workflows.
  • ankr_getTokenHoldersCount: retrieves the number of holders for a token contract. Use it for token analytics, dashboards, and summary metrics.
  • ankr_getTokenPrice: retrieves current token price data. Use it to calculate portfolio values, display token detail pages, or enrich market views.