# Base Wallet Balance & Gas Affordability Checker

> Base Wallet Balance & Gas Affordability Checker is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Returns ETH and USDC balances, nonce, and gas affordability flags for a given Base wallet address.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/chain/wallet?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-wallet-balance-gas-affordability-checker-6c3197f1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yTYU50SoTSZ6b4-7is8-p

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 base-wallet-balance-gas-affordability-checker-6c3197f1
```

Example prompt: Check if the Base wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has enough ETH for gas and enough USDC to make x402 micropayments — show me the balances and the gas cost for an ERC20 transfer.

## When to prefer this

Use this endpoint when an AI agent needs to quickly verify whether a specific Base wallet is funded and ready to act — especially before initiating transactions, paying x402 API fees, or executing onchain workflows. Prefer this over generic block explorer APIs when you need a single low-cost ($0.003 USDC) structured JSON response with both balance and gas affordability pre-computed, with no API key required.

## Known failure modes

- Invalid wallet address format (not 0x + 40 hex chars) — likely 400 error or validation rejection
- Wallet address not found on Base — returns zero balances
- x402 payment failure if calling agent wallet lacks USDC — 402 Payment Required before data is returned
- Network/RPC timeout fetching on-chain data — may return error or stale data
- Rate limiting or infrastructure issues on Cloudflare Worker

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

Returns a JSON object with: ETH balance, USDC balance, chain name ('base'), wallet nonce, boolean can_pay_gas (whether wallet has enough ETH for gas), boolean can_pay_x402 (whether wallet has enough USDC for x402 micropayments), and gas_cost_erc20_transfer_eth (estimated gas cost in ETH for an ERC20 transfer).

## 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": [
      "wallet"
     ],
     "properties": {
      "wallet": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0xe4be4d0bd82d8e68203deff81f79ede0529f2617"
       ],
       "description": "Wallet"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "eth": 0,
  "usdc": 0.079,
  "chain": "base",
  "nonce": 0,
  "wallet": "0xe4be4d0bd82d8e68203deff81f79ede0529f2617",
  "can_pay_gas": false,
  "can_pay_x402": true,
  "gas_cost_erc20_transfer_eth": 4e-7
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-wallet-balance-gas-affordability-checker-6c3197f1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
