# x402-audit Wallet Balance (ETH/ERC-20)

> x402-audit Wallet Balance (ETH/ERC-20) is a paid API for AI agents from x402-audit.tatschluizguilherme.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-02).

Returns the native ETH or ERC-20 token balance of any wallet address on Base, Optimism, or Ethereum Mainnet, including decimals, formatted value, and current block number — without relying on a block explorer API.

## Facts

- Endpoint: GET https://x402-audit.tatschluizguilherme.workers.dev/balance?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-audit-wallet-balance-eth-erc-20-77dbb373
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1-fO3dkBA3CwTC5iqFQ5x

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-audit-wallet-balance-eth-erc-20-77dbb373
```

Example prompt: What's the current USDC balance of wallet 0xAbC...123 on Base — give me the formatted amount and the block number it was checked at?

## When to prefer this

Prefer this endpoint when you need a direct on-chain balance read for ETH or any ERC-20 token on Base, Optimism, or Ethereum Mainnet without going through a centralized block explorer like Etherscan. Ideal for pre-flight checks before transactions, balance-based eligibility gates, or portfolio monitoring in an automated agent pipeline. Use it when you need the precise formatted value plus the block number for auditability.

## Known failure modes

- Invalid or malformed wallet address returns an error or zero balance
- Unsupported network identifier causes a request failure
- Invalid ERC-20 contract address returns an error
- RPC/node connectivity issue causes a timeout or 500 error
- Querying a non-existent token contract may return zero or revert

## How this service works

Pay-per-call on-chain API for AI agents and developers: wallet audits, token safety audits (honeypot detection), live gas prices, token prices, transaction receipts, balances, ENS resolution, block data, ERC-20 allowances, transaction simulation, swap quotes and multicall batches — all computed on-chain via public RPCs (no external market API). Pay per request in USDC on Base via the x402 exact scheme (EIP-3009 transferWithAuthorization). No API key, no signup, no subscription.

## Output

Returns raw balance (in the token's smallest unit), formatted balance (as a human-readable decimal string), token decimals, and the block number at which the balance was read. For native ETH queries no token address is needed; for ERC-20 tokens the contract address is required.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "token": null,
  "native": true,
  "symbol": "ETH",
  "address": "0x8e8d53a67b59E6f2A28e0d6d52012A2b0e3E1886",
  "network": "base",
  "decimals": 18,
  "balanceWei": "194087918645289",
  "blockNumber": 24400123,
  "balanceFormatted": "0.00019408"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-audit-wallet-balance-eth-erc-20-77dbb373/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-audit.tatschluizguilherme.workers.dev](https://www.zero.xyz/host/x402-audit.tatschluizguilherme.workers.dev/llms.txt)
