# First Dollar On-Chain Balance API

> First Dollar On-Chain Balance API is a paid API for AI agents from firstdollar-api.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Returns the on-chain token balance of a given wallet address on the Base blockchain, paid per call via x402.

## Facts

- Endpoint: GET https://firstdollar-api.onrender.com/balance?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/first-dollar-on-chain-balance-api-a610dbbc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Nwx-e-qdlAug5C6_4oy4z

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 first-dollar-on-chain-balance-api-a610dbbc
```

Example prompt: What's the current on-chain balance for wallet 0xAbC123...def456 on Base — and also check how much USDC it holds using the USDC contract 0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA?

## When to prefer this

Use this endpoint when you need a live, real-time balance read from the Base blockchain for a specific wallet, especially when paying per-call is acceptable (e.g. spot checks, agent workflows). Prefer this over indexer APIs when you need the most current chain state rather than indexed/historical data, and when Base is specifically the target network.

## Known failure modes

- Invalid or malformed wallet address (0x... format required) returns an error
- Missing required 'address' query parameter returns a 400-level error
- Unrecognized ERC-20 contract address may return zero or an error
- Network issues with Base chain RPC may cause timeouts or stale data
- Payment failure via x402 prevents the call from executing

## How this service works

Live Base chain reads sold per call over x402 (exact, USDC on Base, $0.02/call).

## Output

Returns the on-chain balance of the specified wallet address on Base, either in the native token or for a specified ERC-20 contract if provided. The response reflects the live state of the blockchain at the time of the call.

## 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"
     ],
     "properties": {
      "token": {
       "type": "string",
       "description": "Optional ERC-20 contract address to include"
      },
      "address": {
       "type": "string",
       "description": "Wallet address to read (0x…)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/first-dollar-on-chain-balance-api-a610dbbc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from firstdollar-api.onrender.com](https://www.zero.xyz/host/firstdollar-api.onrender.com/llms.txt)
