# ERC-20 Token Balance Lookup by Wallet

> ERC-20 Token Balance Lookup by Wallet is a paid API for AI agents from x402-agent-store.rileycraig14.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Returns the ERC-20 token balance for a given wallet address on a specified EVM-compatible chain, paying per call via x402/USDC with no API key required.

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/chain/erc20-balance
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-token-balance-lookup-by-wallet-84ad8bd6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aLmwVIuybm13CW3Eus8V6

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 erc-20-token-balance-lookup-by-wallet-84ad8bd6
```

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

## When to prefer this

Use this endpoint when an AI agent needs to read the on-chain ERC-20 token balance of any wallet across major EVM chains without setting up API keys or accounts. It is ideal for DeFi automation, portfolio checks, or any workflow requiring permissionless, pay-per-call on-chain data access via x402 micro-payments in USDC.

## Known failure modes

- Invalid or malformed wallet address returns an error response
- Invalid or non-ERC-20 token contract address returns an error
- Unsupported chain name returns an error (supported: base, ethereum, optimism, arbitrum, polygon, gnosis)
- Missing required query parameters (wallet or token) returns a validation error
- Payment failure or insufficient USDC for x402 fee returns HTTP 402
- RPC node unavailability may cause intermittent timeouts

## How this service works

Any wallet's balance of any ERC-20 token (USDC, USDT, DAI, or any contract) via balanceOf, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The token-balance read wallet-tracking, copy-trade, treasury and trading agents poll constantly — the most-called RPC read after native balance. Live public RPC; undercuts onesource at $0.001.

## Output

A JSON object containing the wallet address, token contract address, chain name, human-readable balance (float), token decimals (integer), and raw balance string (unscaled integer before decimal adjustment).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "wallet",
      "token"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      },
      "token": {
       "type": "string",
       "description": "ERC-20 token contract address (0x...)"
      },
      "wallet": {
       "type": "string",
       "description": "Holder wallet address (0x...)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "balance": {
       "type": "number"
      },
      "decimals": {
       "type": "number"
      },
      "raw_balance": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "token": "0x...",
  "wallet": "0x...",
  "balance": 1250.5,
  "decimals": 6,
  "raw_balance": "1250500000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-balance-lookup-by-wallet-84ad8bd6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-store.rileycraig14.workers.dev](https://www.zero.xyz/host/x402-agent-store.rileycraig14.workers.dev/llms.txt)
