# ERC-20 Token Balance on Base

> ERC-20 Token Balance on Base is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Returns the live ERC-20 token balance for a wallet on the Base chain, including decimal-adjusted balance, raw balance, symbol, and current block number.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/crypto/erc20-balance?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-token-balance-on-base-7c9701d6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DhwbCAsHJ8JvTisOKRbK4

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-on-base-7c9701d6
```

Example prompt: What's the current USDC balance (token contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) for wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base right now?

## When to prefer this

Choose this endpoint when you need a live, single-call ERC-20 token balance on the Base chain with decimals already applied, raw balance, and block context — particularly useful for DeFi agents that need to verify wallet holdings before executing swaps, transfers, or payment checks. Prefer over generic block explorers when you need structured JSON output ready for agent consumption at a predictable per-call cost via x402.

## Known failure modes

- Invalid token or wallet address format (must be 0x + 40 hex chars) returns a 400/validation error
- Token contract does not exist on Base returns zero balance or an error
- Payment not included or insufficient (x402 payment required, $0.003 USDC on Base)
- RPC node timeout or Base chain congestion causing delayed or failed response
- Wallet address is valid but has never interacted with the token — returns balance of 0

## How this service works

Live ERC-20 balance on Base: token=0x..&wallet=0x.. -> balance (decimals applied), raw, symbol, block.

## Output

Returns a JSON object with: decimal-adjusted balance (float), balance_raw (string integer before decimals), token symbol, number of decimals, token contract address, wallet address, chain name ('base'), and the block number at which the balance was read.

## 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": [
      "token",
      "wallet"
     ],
     "properties": {
      "token": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
       ],
       "description": "Base ERC-20 contract"
      },
      "wallet": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0xe4be4d0bd82d8e68203deff81f79ede0529f2617"
       ],
       "description": "Wallet"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "block": 53204016,
  "chain": "base",
  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "symbol": "USDC",
  "wallet": "0xe4be4d0bd82d8e68203deff81f79ede0529f2617",
  "balance": 0.061,
  "decimals": 6,
  "balance_raw": "61000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-balance-on-base-7c9701d6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
