{"uid":"cap_HTA_5xcbOh1NehX89JWhL","slug":"wallet-balance-gas-readiness-checker-x402-078cdfd8","name":"Wallet Balance & Gas Readiness Checker (x402)","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/v1/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_iBf8ZL85w44z8M6poqZZa","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, gas affordability, and x402 payment capability for a given Base wallet address.","exampleAgentPrompt":"Check if my Base wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has enough ETH for gas and enough USDC to cover an x402 micropayment — show me the balances and whether it's ready to transact.","exampleUseCases":[{"title":"Pre-flight check before onchain action","prompt":"Before my agent submits that ERC-20 transfer, check wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base — does it have enough ETH for gas and is the nonce correct?"},{"title":"Verify agent wallet is x402-ready","prompt":"My trading agent uses wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 — can you confirm it has USDC to pay for x402 API calls and ETH to cover gas costs on Base?"},{"title":"Debug why a wallet transaction is failing","prompt":"Transaction keeps failing for wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base — check the ETH balance, USDC balance, and nonce to help me figure out what's wrong."}],"resultDescription":"Returns a JSON object with: ETH balance (float), USDC balance (float), chain name ('base'), nonce (integer), boolean flags can_pay_gas and can_pay_x402, and gas_cost_erc20_transfer_eth (estimated cost in ETH for an ERC-20 transfer). Lets agents instantly assess whether a wallet is ready to transact or pay for x402 services.","failureModes":["Invalid wallet address format (must match ^0x[0-9a-fA-F]{40}$) — returns error","Missing required wallet query parameter — returns 400 or error response","Payment not received / x402 payment flow failure — returns 402 requiring USDC payment","RPC timeout or Base network unavailability — may return 503 or partial data","Wallet with zero balances returns valid response but can_pay_gas=false and can_pay_x402=false"],"whenToPreferThis":"Use this endpoint when an AI agent needs to quickly verify whether a Base wallet is funded and ready to transact — particularly before attempting onchain actions or x402 micropayments. Ideal for pre-flight checks in autonomous agent workflows where gas and payment readiness must be confirmed without setting up API keys. Prefer over manual RPC calls when you want a single structured response covering balances, nonce, gas affordability, and x402 payment capability in one shot for $0.003 USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:00.896Z","isFirstParty":false,"canonicalSlug":"wallet-balance-gas-readiness-checker-x402-078cdfd8"}