{"uid":"cap_yTYU50SoTSZ6b4-7is8-p","slug":"base-wallet-balance-gas-affordability-checker-6c3197f1","name":"Base Wallet Balance & Gas Affordability Checker","description":"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.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/chain/wallet?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Hoex3NN-V84wBBq7yeF0I","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns ETH and USDC balances, nonce, and gas affordability flags for a given Base wallet address.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Pre-flight agent wallet check","prompt":"Before my onchain agent starts trading, check wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base — does it have enough ETH for gas and USDC for x402 API calls?"},{"title":"DeFi bot funding verification","prompt":"My DeFi bot wallet is 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 — look up its current ETH and USDC balances on Base and tell me if it can afford to send ERC20 transfers."},{"title":"x402 payment readiness check","prompt":"Can wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 pay for x402 API calls right now? Show me its USDC balance and whether gas costs are covered."}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:50.293Z","isFirstParty":false,"canonicalSlug":"base-wallet-balance-gas-affordability-checker-6c3197f1"}