# Token Metadata

> Token Metadata is a paid API for AI agents from x402-echo-service.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Reads ERC-20 token metadata (name, symbol, decimals, total supply) for a given contract address on Base.

## Facts

- Endpoint: POST https://x402-echo-service.onrender.com/chain/token
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-metadata-e52248b0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5TMeXHkkbbSmCH3EhaucI

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability token-metadata-e52248b0 -d '<json body>'
```

Example prompt: What's the name, symbol, decimals, and total supply of the ERC-20 token at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base?

## When to prefer this

Use this endpoint when you need to resolve ERC-20 token metadata (name, symbol, decimals, total supply) for a contract on Base specifically. Prefer it over generic blockchain explorers when you need structured, machine-readable output with both raw and decimal-adjusted supply in a single call. It also provides clear error differentiation for non-token addresses, making it useful for validation workflows.

## Known failure modes

- Address is an EOA or non-ERC-20 contract — returns a descriptive error indicating the address is not a token contract
- Invalid or malformed address format — returns a validation error
- Token contract lacks standard ERC-20 metadata functions — partial or error response
- Network or RPC timeout — service unavailable error
- Zero-address or null input — error returned

## How this service works

Read ERC-20 metadata on Base. POST {"token":"0x..."} and receive the name, symbol, decimals and total supply, with the supply given both raw and decimal-adjusted. Reports a clear error when the address is not a token contract.

## Output

Returns the token's name (e.g. 'USD Coin'), symbol (e.g. 'USDC'), decimals (e.g. 6), raw total supply as a big integer string, and decimal-adjusted total supply as a human-readable number. If the address is not a valid ERC-20 contract, returns a clear error message.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "token": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-metadata-e52248b0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-echo-service.onrender.com](https://www.zero.xyz/host/x402-echo-service.onrender.com/llms.txt)
