# EVM Wallet Balance Lookup API

> EVM Wallet Balance Lookup API is a paid API for AI agents from x402-safe-upgrade-api.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-12).

Retrieves native and ERC-20 token balances for a given EVM wallet address on Base or Base Sepolia networks.

## Facts

- Endpoint: POST https://x402-safe-upgrade-api.onrender.com/v1/wallet-balance?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-wallet-balance-lookup-api-3e5f9940
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bS8wy8x_1n4IRLHUcHSQ5

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 evm-wallet-balance-lookup-api-3e5f9940 -d '<json body>'
```

Example prompt: What's the current native ETH balance and USDC token balance (contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) for the wallet 0x1234...abcd on the Base mainnet?

## When to prefer this

Use this endpoint when you need a quick, paid on-demand balance lookup for a wallet on Base mainnet or Base Sepolia testnet, especially in agentic workflows where trustless, evidence-backed financial state verification is needed before executing transactions or making decisions.

## Known failure modes

- Invalid or malformed 0x address returns an error
- Unsupported chain value (not 'base' or 'base-sepolia') causes rejection
- Invalid ERC-20 contract address returns token balance as zero or error
- Network connectivity issues with the Base RPC may cause timeouts
- Payment failure (402) if USDC payment is not correctly attached

## How this service works

Evidence-backed npm package upgrade decisions for coding agents.

## Output

Returns a JSON object containing the wallet's native balance in Wei and, if a token contract address was provided, the ERC-20 token's raw balance and contract address.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "base-sepolia"
   ],
   "type": "string"
  },
  "address": {
   "type": "string",
   "description": "Public 0x-prefixed EVM address."
  },
  "tokenAddress": {
   "type": "string",
   "description": "Optional public ERC-20 contract address."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "token": {
   "address": "0x...",
   "balanceRaw": "0"
  },
  "nativeBalanceWei": "0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-wallet-balance-lookup-api-3e5f9940/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-safe-upgrade-api.onrender.com](https://www.zero.xyz/host/x402-safe-upgrade-api.onrender.com/llms.txt)
