# x402-balance

> x402-balance is a paid API for AI agents from x402-extract-wg5z.onrender.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-04).

Returns the native ETH balance of any wallet address on the Base network, in both wei and ETH, along with the block number at which it was read.

## Facts

- Endpoint: GET https://x402-extract-wg5z.onrender.com/v1/balance/:address?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-balance-2d9cdaf0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eXY90LCISzak--QfTh3y_

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 x402-balance-2d9cdaf0
```

Example prompt: What's the current ETH balance on Base for wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045? Give me both the ETH and wei amounts.

## When to prefer this

Use this endpoint when you need a quick, machine-readable, single-call lookup of a wallet's native ETH balance on Base without running your own RPC node. It returns both wei (exact integer string) and ETH (decimal string) together with the block number, making it ideal for agents performing pre-transaction gas checks, portfolio snapshots, or funding verifications on Base — especially in pay-per-call pipelines using the x402 micropayment protocol.

## Known failure modes

- Invalid or malformed address (not 0x + 40 hex chars) returns an error
- Address with zero balance returns balance_wei of '0' and balance_eth of '0.0' — not an error
- RPC or network outage on Base may cause a 500 or timeout
- Payment failure (insufficient USDC or x402 protocol error) results in 402 Payment Required

## How this service works

Native ETH balance for any wallet on Base, machine-readable, one call. $0.003 USDC per call on Base.

## Output

Returns a JSON object with the EIP-55 checksummed wallet address, native ETH balance expressed as a string in wei (exact, no floating-point loss), ETH balance as a decimal string, the Base block number at which the balance was read, and the chain identifier ('base').

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "Wallet address as a path parameter: GET /v1/balance/0x… (0x + 40 hex chars)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "address",
      "balance_wei",
      "balance_eth",
      "block_number",
      "chain"
     ],
     "properties": {
      "chain": {
       "enum": [
        "base"
       ],
       "type": "string"
      },
      "address": {
       "type": "string",
       "description": "EIP-55 checksummed address"
      },
      "balance_eth": {
       "type": "string",
       "description": "Native ETH balance in ETH"
      },
      "balance_wei": {
       "type": "string",
       "description": "Native ETH balance in wei (string: exact, no float loss)"
      },
      "block_number": {
       "type": "integer",
       "description": "Base block the balance was read at"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-balance-2d9cdaf0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-extract-wg5z.onrender.com](https://www.zero.xyz/host/x402-extract-wg5z.onrender.com/llms.txt)
