# ERC-20 Token Balance Lookup

> ERC-20 Token Balance Lookup is a paid API for AI agents from x402-gateway-production-1f21.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Returns the ERC-20 token balance for a given wallet address and contract on Base or Ethereum networks.

## Facts

- Endpoint: POST https://x402-gateway-production-1f21.up.railway.app/chain/erc20-balance?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-token-balance-lookup-932aee8e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hku4kIuK9qnThHrYs5y2O

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-932aee8e -d '<json body>'
```

Example prompt: Check the ERC-20 token balance for wallet address 0xAbCd1234... using contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on the Base network.

## When to prefer this

Choose this endpoint when you need a machine-payable, on-demand ERC-20 balance lookup for Base or Ethereum without setting up your own RPC node or Web3 provider. Ideal for AI agents that need lightweight, pay-per-call token balance queries without managing API keys or subscriptions.

## Known failure modes

- Invalid wallet address format (must match 0x followed by 40 hex characters)
- Invalid contract address format (same pattern required)
- Unsupported network (only 'base' and 'ethereum' accepted)
- Payment failure or insufficient USDC for x402 toll
- Contract address is not a valid ERC-20 token
- Network RPC unavailability causing timeout

## How this service works

Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.

## Output

Returns a JSON object with a status field (e.g. 'ready') and the ERC-20 token balance for the specified wallet and contract address on the requested network.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "address",
      "contract"
     ],
     "properties": {
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "network": {
       "enum": [
        "base",
        "ethereum"
       ],
       "type": "string",
       "default": "base"
      },
      "contract": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "ready"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-balance-lookup-932aee8e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production-1f21.up.railway.app](https://www.zero.xyz/host/x402-gateway-production-1f21.up.railway.app/llms.txt)
