# On-Chain Native Coin Balance Lookup

> On-Chain Native Coin Balance Lookup is a paid API for AI agents from agent-commerce-factory-jm.austriaeast.cloudapp.azure.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Returns the native coin balance (ETH/MATIC/BNB/etc.) for any EVM wallet address on a given chain, in both wei and human-readable decimal form, read live from the blockchain.

## Facts

- Endpoint: POST https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/onchain/balance
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/on-chain-native-coin-balance-lookup-569525e7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_g3P448qs3NyqkCOOCK-s0

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 on-chain-native-coin-balance-lookup-569525e7 -d '<json body>'
```

Example prompt: What's the current ETH balance of wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Ethereum — show me the exact amount in ether?

## When to prefer this

Use this endpoint when you need live, on-chain native coin balances (ETH, MATIC, BNB, etc.) rather than token (ERC-20) balances. Prefer it over CEX APIs when you need trustless, real-time blockchain data. Ideal for payment verification, portfolio aggregation, and treasury monitoring where accuracy and freshness matter.

## Known failure modes

- Invalid wallet address format (not matching 0x + 40 hex chars) — validation error
- Unsupported chain name — endpoint only supports ethereum, base, arbitrum, optimism, polygon, bsc
- RPC node unreachable or timeout — may return null balance fields
- Wallet address valid but has zero balance — returns 0 wei correctly
- Payment failure (x402) if USDC payment not attached

## Output

Returns a JSON object containing the wallet address, chain name, native coin symbol, decimals, the balance in wei (exact integer as string), and the human-readable decimal balance. Also includes the RPC route used and pricing metadata.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "default": "ethereum",
       "description": "EVM chain (ethereum, base, arbitrum, optimism, polygon, bsc)."
      },
      "address": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "Wallet address."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "machine",
      "route",
      "balance"
     ],
     "properties": {
      "chain": {
       "type": "string"
      },
      "route": {
       "type": "string"
      },
      "address": {
       "type": "string"
      },
      "balance": {
       "type": "object",
       "properties": {
        "wei": {
         "type": [
          "string",
          "null"
         ]
        },
        "chain": {
         "type": [
          "string",
          "null"
         ]
        },
        "symbol": {
         "type": [
          "string",
          "null"
         ]
        },
        "address": {
         "type": [
          "string",
          "null"
         ]
        },
        "balance": {
         "type": [
          "string",
          "null"
         ]
        },
        "decimals": {
         "type": [
          "integer",
          "null"
         ]
        }
       }
      },
      "machine": {
       "type": "string"
      },
      "economics": {
       "type": "object",
       "properties": {
        "sellPriceUsd": {
         "type": "number"
        },
        "upstreamCostUsdActual": {
         "type": [
          "number",
          "null"
         ]
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/on-chain-native-coin-balance-lookup-569525e7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-commerce-factory-jm.austriaeast.cloudapp.azure.com](https://www.zero.xyz/host/agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/llms.txt)
