$ man token-balance
/token-balance
PRICE / CALL
$0.002
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarketCATEGORY
uncategorized
STATUS
● live
NAME
token-balance — token balance api / erc-20 balanceof reader / on-chain token holdings lookup
synonym alias of erc20-balance — reuses the canonical handler.
SYNOPSIS
POST https://x402.agentutility.ai/token-balance
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Token balance API / ERC-20 balanceOf reader / on-chain token holdings lookup. Same public-RPC backend as erc20-balance, exposed for agents searching for token-balance wording. Returns raw balance, hex balance, decimals, and formatted balance.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| token | string | ERC-20 contract address (0x...). | required |
| wallet | string | Wallet address to query (0x...). | required |
| chain | any | Chain id or slug. Default 'base'; also ethereum, arbitrum, optimism, polygon, bsc, avalanche. | optional |
| block | any | 'latest' default, or hex/decimal block number. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| chain | string | — |
| token | string | — |
| wallet | string | — |
| balance_raw | string | — |
| balance | string | — |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/token-balance \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the token-balance tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- edge-markettokenbalancetoken-balance
- methods
- POST
- cluster
- edgemarket
- price
- $0.002 USDC per call
ADJACENT — other endpoints in edgemarket
| endpoint | description | price |
|---|---|---|
| current-balance | Current balance API / wallet current balance / token balance lookup. | $0.002 |
| erc20-balance | ERC-20 balance reader / balanceOf / on-chain token balance / wallet balance lookup / multi-chain ERC20 balance / read Base / read Ethereu… | $0.002 |
| erc20-metadata | ERC-20 metadata reader / token info / token symbol lookup / token decimals / total supply / multi-chain ERC20 reader / Base / Ethereum /… | $0.002 |
| funding-rates | Perp funding rates / Binance USD-M futures funding / next-funding-time / 24h history / perp basis. | $0.002 |
| wallet-current-balance | Wallet current balance API / ERC-20 wallet balance / treasury balance check. | $0.002 |
| hyperliquid-market | Hyperliquid market API / Hyperliquid market data / perps mark price / crypto futures market lookup. | $0.001 |
| 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 |
SEE ALSO