How to get ERC-20 token metadata (name, symbol, decimals) via API

POST a chain and a token contract address to /v1/chain/token. It returns the token's name, symbol, decimals and total supply, or is_erc20:false if the address does not behave like an ERC-20.

Request

chain is ethereum or base; address is the token contract (0x plus 40 hex characters).

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/chain/token \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"chain":"base","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}'

Response

Response (the example from the OpenAPI spec, trimmed)
{
  "chain": "base",
  "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "is_erc20": true,
  "name": "USD Coin",
  "symbol": "USDC",
  "decimals": 6,
  "total_supply_raw": "4440602565916867",
  "total_supply": "4440602565.916867"
}

Limits and caveats

Attacker-controlled strings. Name and symbol are written by the token's deployer. Impersonating tokens reuse well-known names and symbols, so identify a token by its address, never by its symbol.

Metadata is not safety. A valid ERC-20 shape says nothing about whether the token can be sold or whether an owner can mint or freeze. For that, run an address risk check.

Use decimals to turn raw amounts into display amounts; total_supply is already formatted.

Price and free allowance

USD 0.003 per call, paid in USDC on Base with x402. 10 free chain reads per IP per UTC day with the header X-Tanod-Free: 1, in one pool shared with the other chainpeek reads. MCP tool: get_token_info at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: How to get an ETH or ERC-20 balance of an address via API, How to check a contract or token address for risk before you transact, How to check an ERC-20 approval (allowance). Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.