# Agent Data Tools: ERC-20 Token Balance Lookup

> Agent Data Tools: ERC-20 Token Balance Lookup is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Returns the ERC-20 token balance of a given wallet address for a specified token contract on a supported EVM chain

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/op/token-balance?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-erc-20-token-balance-lookup-70ac74a6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rQQEpmbpXF7Up2mBA8ph5

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 agent-data-tools-erc-20-token-balance-lookup-70ac74a6
```

Example prompt: What's the USDC balance (contract 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85) for wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Optimism?

## When to prefer this

Use this endpoint when you need a live, on-chain ERC-20 token balance for a specific wallet-and-token-contract pair across Base, Ethereum, Arbitrum, Optimism, or Polygon, and you want pay-per-call pricing with no API key setup. Prefer it over general blockchain explorers when building AI agent workflows that need structured JSON output and micropayment-compatible access via x402.

## Known failure modes

- Invalid or malformed wallet address returns an error or empty response
- Invalid ERC-20 contract address returns an error or zero balance
- Chain not supported results in an error response
- Network timeout or RPC node unavailability causes a request failure
- Wallet with zero balance returns balance of '0' rather than an error
- Missing required query parameters (token or address) returns a 400-level error

## How this service works

ERC-20 token balance of a wallet on Optimism (USDC, USDT, WETH or any token, via balanceOf): raw amount, decimals, symbol and the human-readable amount, live from the token contract. Use to check stablecoin or token holdings before a transfer or trade; for the native coin use op_balance. Both inputs are 0x addresses (40 hex characters); no contract returns 404 and a non-ERC-20 contract 422, both uncharged.

## Output

Returns a JSON object with the human-readable token balance (e.g. '2.5'), the raw integer balance (e.g. '2500000'), the token symbol, decimals, the wallet address queried, the token contract address, the chain name (e.g. 'Optimism'), and the numeric chain ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "token",
  "address"
 ],
 "properties": {
  "token": {
   "type": "string",
   "description": "Token: a ticker such as USDC, USDT, WETH or DAI, or the 0x ERC-20 contract address"
  },
  "address": {
   "type": "string",
   "description": "0x wallet address"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "raw": {
   "type": "string"
  },
  "chain": {
   "type": "string"
  },
  "token": {
   "type": "string"
  },
  "symbol": {
   "type": "string"
  },
  "address": {
   "type": "string"
  },
  "balance": {
   "type": "string"
  },
  "chainId": {
   "type": "number"
  },
  "decimals": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-erc-20-token-balance-lookup-70ac74a6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
