ERC-20 token metadata

$0.001 per call · USDC via x402 · POST /api/token-metadata

Resolve an ERC-20 contract address to its on-chain metadata: symbol, decimals, name, and logo URL where available. Send POST /api/token-metadata with the required field contract and pay $0.001 per call over x402 or MPP (there is no free tier). It returns a JSON object with contract, network, symbol, name, decimals and 1 more.

Use this to humanize a raw contract address before showing it to a user or before computing fiat values.

Category: Crypto & onchain data · Tags: crypto erc20 token metadata evm

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
contractstringyes0x-prefixed 40-char ERC-20 contract address. Also accepted as contractAddress, token, address.
networkstringnoethereum / base / polygon / arbitrum / optimism (default base).

Example request

curl -i -X POST https://agent402.tools/api/token-metadata \
  -H "Content-Type: application/json" \
  -d '{"contract":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","network":"base"}'

Without payment this returns HTTP 402 Payment Required with the exact price for token-metadata; any x402 v2 or MPP client pays it and retries.

Example response

{
  "contract": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "network": "base",
  "symbol": "USDC",
  "name": "USD Coin",
  "decimals": 6,
  "logo": "https://example.com/usdc.png"
}
FieldTypeAlways presentIn the example
contractstringyes0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
networkstringyesbase
symbolstringyesUSDC
namestringyesUSD Coin
decimalsnumberyes6
logostringyeshttps://example.com/usdc.png

From an MCP client

catalog.call {
  "slug": "token-metadata",
  "params": {
    "contract": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "network": "base"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for token-metadata; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/token-metadata", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "contract": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "network": "base"
  }),
});

Part of these workflows

ERC-20 token metadata is one step in this skill pack, each sold as a single call:

Related tools

Token price by contract address

$0.005 · GET /api/coin-price-by-contract

Live price, market cap, 24h volume and 24h change for ERC-20 / SPL / other chain tokens looked up by CONTRACT ADDRESS on…

Wallet balance (native + ERC-20)

$0.002 · POST /api/wallet-balance

Look up the native coin balance (ETH/MATIC) plus every ERC-20 holding for a wallet address on Ethereum, Base, Polygon, A…

Known-address label lookup

FREE w/ compute · or $0.002 · POST /api/address-label

Label a known EVM address from a curated, committed dataset: major stablecoin + token contracts (the USDC and USDG contr…

Wallet token transfers (filtered)

$0.003 · POST /api/asset-transfers

Recent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…

Token total supply

$0.001 · GET /api/chain/total-supply

The circulating total supply of an ERC-20, read from the token contract itself rather than from an aggregator, so it is …

NFT owner lookup (ERC-721 ownerOf)

$0.002 · GET /api/erc721-owner

Who owns this NFT? Calls ownerOf(tokenId) on any ERC-721 contract on Ethereum, Base, Polygon, Arbitrum, or Optimism. Com…