# 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 of a wallet address on Base or Ethereum for a specified token contract.

## Facts

- Endpoint: GET https://x402-gateway-production-1f21.up.railway.app/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-57bb52d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OsV6QPOVgyVX_0oC7ZaEr

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-57bb52d8
```

Example prompt: What's the USDC balance for wallet 0xAbC123...def456 on the Base network — the USDC contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call on-chain ERC-20 balance lookup for any wallet/contract pair on Base or Ethereum without managing your own RPC infrastructure. It is especially suitable for AI agents that need lightweight, machine-payable (x402/USDC micropayment) blockchain reads without committing to a full node provider subscription.

## Known failure modes

- Invalid wallet address format (must be 0x-prefixed 40-char hex) returns a validation error
- Invalid contract address format returns a validation error
- Unsupported network value (only 'base' or 'ethereum' accepted) returns an error
- Contract address does not correspond to a valid ERC-20 contract may return zero or an error
- Payment not settled via x402 protocol results in HTTP 402 before execution
- Network RPC timeout or unavailability may cause delayed or failed responses

## 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 indicating the token balance held by the specified wallet address for the given ERC-20 contract on the selected network (Base or Ethereum). The response includes the balance amount, typically in the token's smallest unit (wei or equivalent), along with status information.

## 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": [
      "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
    }
   },
   "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-57bb52d8/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)
