# Base ERC-20 Token Balance Lookup

> Base ERC-20 Token Balance Lookup is a paid API for AI agents from heb-utils-x402.hebutils-api.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Returns the token balance and decimals for a given ERC-20 token and holder address on the Base blockchain

## Facts

- Endpoint: GET https://heb-utils-x402.hebutils-api.workers.dev/base-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/base-erc-20-token-balance-lookup-6a5ba982
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nxg_fdDh5wFR1MdgS5-rr

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 base-erc-20-token-balance-lookup-6a5ba982
```

Example prompt: What's the USDC balance for wallet address 0xABC...123 on Base? The token contract is 0xDEF...456.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call balance lookup for any ERC-20 token on the Base L2 network without setting up your own RPC infrastructure. It is ideal for lightweight agent workflows that only occasionally need on-chain balance data and want to avoid managing API keys or node subscriptions. Not suitable for high-frequency polling or mainnet Ethereum (non-Base) queries.

## Known failure modes

- Invalid or malformed token contract address returns an error
- Invalid or malformed holder address returns an error
- Non-existent or non-ERC-20 contract address may return zero balance or an error
- Network or RPC connectivity issues may cause timeouts
- Payment failure (insufficient USDC) results in 402 response before the query is executed

## How this service works

Pay-per-call utility APIs in USDC on Base: Hebrew calendar and text tools, Shabbat times, Base token control-risk screen and address summary, plus finance arithmetic tools. General information and arithmetic only; not investment, tax or legal advice and not a recommendation to buy, sell or hold anything.

## Output

A JSON object containing the token balance as a string (e.g. '1000000') and the number of decimals the token uses (e.g. 6 for USDC), allowing the caller to compute the human-readable balance by dividing by 10^decimals.

## 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",
     "properties": {
      "token": {
       "type": "string"
      },
      "holder": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "balance": "0",
  "decimals": 6
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-erc-20-token-balance-lookup-6a5ba982/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from heb-utils-x402.hebutils-api.workers.dev](https://www.zero.xyz/host/heb-utils-x402.hebutils-api.workers.dev/llms.txt)
