# BRAINIAC ERC-20 Token Balance Lookup

> BRAINIAC ERC-20 Token Balance Lookup is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-16).

Returns the ERC-20 token balance of a given wallet address at a specified block number on-chain

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/chain-data/token/erc20-balance?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-erc-20-token-balance-lookup-d5aa2b2a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1L62elRBn4T82oyvi3ATG

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 brainiac-erc-20-token-balance-lookup-d5aa2b2a -d '<json body>'
```

Example prompt: What's the USDC balance (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) for wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 right now?

## When to prefer this

Use this endpoint when you need a simple, accountless, pay-per-call ERC-20 token balance lookup without managing API keys or subscriptions. It is ideal for agents that need occasional on-chain balance checks without integrating a full blockchain node or indexer. The x402 micropayment model (0.01 USDC per call) makes it cost-effective for low-frequency queries. Prefer alternatives like Alchemy or Infura if you need high-volume queries, WebSocket subscriptions, or multi-chain support beyond what BRAINIAC offers.

## Known failure modes

- Invalid wallet address format (must be 0x-prefixed 40-character hex) returns an error
- Invalid token contract address format returns an error
- Block number exceeding safe integer maximum is rejected
- Non-existent or non-ERC-20 contract address may return zero or error
- Payment failure via x402/USDC on Base results in 402 response and no data
- Network or RPC node issues may cause timeouts or stale data

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

A JSON response containing the ERC-20 token balance for the specified wallet address and token contract, optionally at a historical block number. The balance is returned as an on-chain value reflecting the token holdings at that point in time.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "blockNumber": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": 0
  },
  "tokenAddress": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "walletAddress": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": {
   "url": "https://mainnet.base.org",
   "status": "OK"
  },
  "balance": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "chainId": 8453,
  "blockNumber": "latest",
  "retrievedAt": "2026-11-07T12:08:59.747Z",
  "tokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "walletAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "balanceDecimal": "0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-erc-20-token-balance-lookup-d5aa2b2a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
