# x402 Agent Hub – Native Coin Balance

> x402 Agent Hub – Native Coin Balance is a paid API for AI agents from x402-agent-hub.x402-agent-hub.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-14).

Returns the native coin balance (raw wei and formatted) of any wallet or contract address on Base, Ethereum, Arbitrum, Optimism, Polygon, BSC, or Avalanche, along with the block number at which it was read.

## Facts

- Endpoint: GET https://x402-agent-hub.x402-agent-hub.workers.dev/v1/chain/balance?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-agent-hub-native-coin-balance-3c03b162
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xiV1sQzwvhA-5Hg4j9D18

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-agent-hub-native-coin-balance-3c03b162
```

Example prompt: What's the current ETH balance of 0x1721E9841257A34DbDBA407D4DBA3a727a02d072 on Base — give me both the raw wei and the formatted amount?

## When to prefer this

Choose this endpoint when you need the native coin balance (ETH, MATIC, BNB, AVAX, etc.) of an address on one of the 7 supported EVM chains and want both raw wei and human-readable formatted output in a single call. Prefer this over ERC-20 balance endpoints when dealing with the chain's native asset, not a token contract. The pay-per-successful-read model (errors are not charged) makes it low-risk for validation or exploratory queries.

## Known failure modes

- Invalid or malformed address (not 0x-prefixed or wrong length) — settlement cancelled, no charge
- Unsupported chain name or chain ID — request rejected, settlement cancelled
- RPC or upstream node error on the target chain — settlement cancelled, no charge
- Rate limiting or quota exhaustion on the underlying RPC provider

## How this service works

Native coin balance of any address on Base, Ethereum, Arbitrum, Optimism, Polygon, BSC or Avalanche, with raw wei and formatted units plus the block it was read at. You only pay for successful reads: invalid input, not-found and upstream errors cancel settlement.

## Output

A JSON object containing the chain name, queried address, balance in raw wei, symbol (e.g. ETH, MATIC, BNB), decimals, formatted balance string, chain ID, and the block number at which the balance was read.

## 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": {
      "chain": {
       "type": "string",
       "description": "base (default), ethereum, arbitrum, optimism, polygon, bsc or avalanche. Chain IDs also accepted."
      },
      "address": {
       "type": "string",
       "description": "0x-prefixed wallet or contract address."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "address": "0x1721E9841257A34DbDBA407D4DBA3a727a02d072",
  "balance": {
   "raw": "1250000000000000",
   "symbol": "ETH",
   "decimals": 18,
   "formatted": "0.00125"
  },
  "chainId": 8453,
  "blockNumber": 38211554
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-agent-hub-native-coin-balance-3c03b162/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-hub.x402-agent-hub.workers.dev](https://www.zero.xyz/host/x402-agent-hub.x402-agent-hub.workers.dev/llms.txt)
