# Wallet Balance

> Wallet Balance is a paid API for AI agents from chain.tollkit.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-11).

Fetches native and ERC-20/SPL token balances for a given wallet or contract address on Base, Ethereum, or Solana, paid per-call via x402 in USDC.

## Facts

- Endpoint: POST https://chain.tollkit.dev/chain/balance?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wallet-balance-c79383d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u6TPPWFaQzlN2iV12UrQL

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 wallet-balance-c79383d0 -d '<json body>'
```

Example prompt: What's the ETH balance and all ERC-20 token holdings for the wallet 0xAbCd1234...5678 on Ethereum?

## When to prefer this

Choose this endpoint when you need to check wallet or contract balances on Base, Ethereum, or Solana without setting up an account or API key — payment is handled inline via x402 USDC micropayments. It's ideal for ad-hoc, pay-as-you-go balance lookups inside autonomous agents or workflows where managing API credentials is impractical.

## Known failure modes

- Invalid address format — returns validation error if address doesn't match expected hex or base58 pattern
- Unsupported chain — error if chain value is not 'base', 'ethereum', or 'solana'
- Too many tokens — error if more than 20 token contracts are provided
- Payment failure — x402 payment not accepted or insufficient USDC balance
- Address not found or empty — returns zero balances or empty response for fresh/unused addresses
- RPC timeout — underlying node may time out for heavily used contracts

## How this service works

Wallet balances, tokens, transactions and prices on Base, Ethereum and Solana. Other Tollkit tools are described at: https://extract.tollkit.dev/openapi.json, https://attest.tollkit.dev/openapi.json, https://web.tollkit.dev/openapi.json, https://data.tollkit.dev/openapi.json.

## Output

Returns the native token balance (ETH, SOL, etc.) and balances for any requested ERC-20 or SPL tokens held by the specified address on the chosen chain, typically as a structured JSON object with token symbols, contract addresses, and formatted amounts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "ethereum",
    "solana"
   ],
   "type": "string",
   "default": "base",
   "description": "Which chain to read: \"base\" (default), \"ethereum\" or \"solana\"."
  },
  "tokens": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^(0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
   },
   "maxItems": 20,
   "description": "Extra ERC-20 contracts (or SPL mints on Solana) to include."
  },
  "address": {
   "type": "string",
   "pattern": "^(0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$",
   "description": "Wallet (or contract) address to check."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "native": {
   "symbol": "ETH",
   "balance": "0",
   "balance_wei": "0"
  },
  "tokens": [
   {
    "name": "USD Coin",
    "symbol": "USDC",
    "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "balance": "2.222",
    "decimals": 6,
    "balance_raw": "2222000"
   }
  ],
  "address": "0xBbfCE2D320dE6aB328Ba93A771c531ebFC9cE704",
  "checked_at": "2026-10-04T07:45:36.553Z",
  "is_contract": false,
  "block_number": 52155294,
  "explorer_url": "https://basescan.org/address/0xBbfCE2D320dE6aB328Ba93A771c531ebFC9cE704"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wallet-balance-c79383d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chain.tollkit.dev](https://www.zero.xyz/host/chain.tollkit.dev/llms.txt)
