$ man erc20-metadata
/erc20-metadata(1)
PRICE / CALL
$0.002
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarketCATEGORY
uncategorized
STATUS
● live
NAME
erc20-metadata — erc-20 metadata reader / token info / token symbol lookup / token decimals / total supply / multi-chain erc20 reader / base / ethereum /…
SYNOPSIS
POST https://x402.org/v1/erc20-metadata
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
ERC-20 metadata reader / token info / token symbol lookup / token decimals / total supply / multi-chain ERC20 reader / Base / Ethereum / Arbitrum / Optimism / Polygon / BSC / Avalanche. Reads name(), symbol(), decimals(), totalSupply() in parallel via public RPC. Robust to non-standard tokens that return bytes32 instead of string (MakerDAO MKR pattern is decoded). Returns formatted total supply when decimals are present, plus a chain-appropriate block explorer URL.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| token | string | ERC-20 contract address (0x...). | required |
| chain | any | Chain id or slug. 8453|'base' (default), 1|'ethereum', 42161|'arbitrum', 10|'optimism', 137|'polygon', 56|'bsc', 43114|'avalanche'. | optional |
| block | any | 'latest' default, or hex/decimal block number. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| chain | string | Chain name the token lives on (Base, Ethereum, Arbitrum, Optimism, Polygon, BSC, Avalanche). |
| chain_id | string | EVM chain ID for the network the lookup ran against. |
| token | string | ERC-20 contract address that was queried, echoed back checksummed. |
| block | string | Block number the name/symbol/decimals/totalSupply reads were resolved against. |
| name | string | Token name from name(), with bytes32 fallback decoded for non-standard tokens like MKR. |
| symbol | string | Token symbol from symbol(), with bytes32 fallback decoded for non-standard tokens. |
| decimals | string | Decimals from decimals() as a stringified integer (e.g. '18', '6'). |
| total_supply_raw | string | Raw totalSupply() return value as a base-units integer string, no decimal scaling applied. |
| total_supply | string | Human-formatted total supply scaled by decimals, omitted if decimals weren't readable. |
| explorer_url | string | Block explorer link for the token on its chain (Basescan, Etherscan, Arbiscan, etc.). |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/erc20-metadata \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the erc20-metadata tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- erc20token-metadatatoken-symboltoken-decimalstotal-supplymulti-chainedge-marketerc20-reader
- methods
- POST
- cluster
- edgemarket
- price
- $0.002 USDC per call
ADJACENT — other endpoints in edgemarket
| endpoint | description | price |
|---|---|---|
| erc20-balance | ERC-20 balance reader / balanceOf / on-chain token balance / wallet balance lookup / multi-chain ERC20 balance / read Base / read Ethereu… | $0.002 |
| funding-rates | Perp funding rates / Binance USD-M futures funding / next-funding-time / 24h history / perp basis. | $0.002 |
| safe-tx-decode | Gnosis Safe execTransaction decoder. | $0.003 |
| agent-card-resolve | Agent card resolver / ERC-8004 Identity Registry lookup / Trustless Agents / agentId → owner + agentURI / A2A identity / agent.json fetch… | $0.005 |
| arbitrage-spread | Cross-exchange arbitrage spread / max-min price / CEX price dispersion / spread % calculator. | $0.005 |
| basename-resolve | Basename resolver / Coinbase Basenames / .base.eth lookup / Base name service / on-chain name resolution. | $0.005 |
| defi-yield-pools | DeFi yield pools / APY aggregator / yield-farming opportunities / DeFiLlama yields / cross-protocol APY ranking / stablecoin yields / LP… | $0.005 |
| ipfs-fetch | IPFS fetch / IPFS gateway / Web3 storage retrieval / NFT metadata fetcher / Filecoin gateway / decentralized content / pinned-content reader. | $0.005 |
SEE ALSO