B20 token info
GET /api/b20-token-infoERC-20 metadata plus B20 signals for any Base address: name, symbol, decimals, total supply, best-effort paused/cap, bytecode size, and whether the address carries the factory-issued 0xB200 prefix. Send GET /api/b20-token-info with the required field address and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with address, isB20, prefixMatch, name, symbol and 3 more.
Works on plain ERC-20s too (isB20 comes back false). ?address=0x…
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
address | string | yes | 0x token address on Base Also accepted as addr, wallet, account. |
Example request
curl -i "https://agent402.tools/api/b20-token-info?address=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
Without payment this returns HTTP 402 Payment Required with the exact price for b20-token-info; any x402 v2 or MPP client pays it and retries.
Example response
{
"address": "0x8335…2913",
"isB20": false,
"prefixMatch": false,
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"totalSupply": "…",
"totalSupplyFormatted": "…"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
address | string | yes | 0x8335…2913 |
isB20 | boolean | yes | false |
prefixMatch | boolean | yes | false |
name | string | yes | USD Coin |
symbol | string | yes | USDC |
decimals | number | yes | 6 |
totalSupply | string | yes | … |
totalSupplyFormatted | string | yes | … |
From an MCP client
catalog.call {
"slug": "b20-token-info",
"params": {
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for b20-token-info; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
addressis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key (
Authorization: Bearer a402_...) also pays it. - A
POSTwith a JSON body to /api/b20-token-info is served as this GET, with the body as the input. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
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/b20-token-info?address=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913");
Related tools
Verify B20 token
GET /api/b20-verifyBoolean verdict with reasons: is this address a real factory-issued B20 on Base? Checks the 0xB200 address prefix, ERC-2…
B20 activation check
GET /api/b20-activation-checkIs B20 live on Base mainnet? Queries the Activation Registry precompile for base.b20_asset and base.b20_stablecoin (or a…
B20 feature id
POST /api/b20-feature-idPure-CPU helper: turn a B20 feature string (e.g. base.b20_asset) into its bytes32 feature id and ready-to-send isActivat…
B20 payment memos
GET /api/b20-memosPayment memos attached to B20 transfers: pairs each Memo(address,bytes32) log with its Transfer at the previous log inde…
New B20 tokens
GET /api/b20-new-tokensRecently deployed B20 tokens on Base: scans the factory's B20Created logs over a block window, locates each new token by…
Token total supply
GET /api/chain/total-supplyThe circulating total supply of an ERC-20, read from the token contract itself rather than from an aggregator, so it is …