{"uid":"cap_9Sc-Av3gkTPLQ0GZPrihj","slug":"base-gas-price-oracle-x402-1a4b40b0","name":"Base Gas Price Oracle (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/crypto/gas-price?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"properties":{"type":"string"}}},"responseSchema":{"type":"json","example":{"chains":[{"chain":"base","native":"ETH","chain_id":8453,"swap_usd":0.0011,"upstream":"https://base.drpc.org","latency_ms":80,"native_usd":3850.1,"transfer_usd":0.000154,"gas_price_gwei":0.0019,"erc20_transfer_usd":0.000476,"rollup_l1_fee_extra":true}],"cheapest":"base","gas_units":{"swap":150000,"transfer":21000,"erc20_transfer":65000},"sorted_by":"swap_usd","updated_at":"2026-10-30T01:30:00Z","recommendation":"Execute on base (~180x cheaper than Ethereum L1); ...","cheapest_swap_usd":0.0011,"ethereum_vs_cheapest_x":180}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lENt_HnILApGn-FLTOUlk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time Base chain gas prices and transaction cost estimates (swap, transfer, ERC-20) in USD, with a recommendation on cheapest execution venue vs Ethereum L1.","exampleAgentPrompt":"Before executing my token swap, check the current Base gas price and tell me what a swap would cost in USD right now compared to Ethereum mainnet.","exampleUseCases":[{"title":"Pre-trade gas cost check","prompt":"I'm about to swap USDC for ETH on Base — what's the current gas price in gwei and how much will the swap cost me in USD right now?"},{"title":"L1 vs L2 cost comparison","prompt":"Is it currently cheaper to do an ERC-20 transfer on Base or Ethereum mainnet? Give me the USD cost on both and how many times cheaper the cheaper one is."},{"title":"Automated agent trade gating","prompt":"My trading bot is about to execute a position — pull the current Base gas price and tell me if swap costs are under $0.005 USD so I can decide whether to proceed."}],"resultDescription":"A JSON object containing: current gas price in gwei for Base, estimated USD cost for swap (150k gas), ETH transfer (21k gas), and ERC-20 transfer (65k gas); native ETH price in USD; upstream RPC latency; rollup L1 fee flag; a human-readable recommendation string; the multiplier showing how many times cheaper Base is vs Ethereum L1; and a timestamp of when data was fetched.","failureModes":["Upstream RPC (base.drpc.org) unavailable — may return 502 or stale data","x402 payment failure — returns 402 if USDC payment on Base is not completed","Temporary spike in gas that makes estimates inaccurate within seconds of fetch","Missing or malformed response if Base network is congested or experiencing issues"],"whenToPreferThis":"Use this endpoint when an AI trading or onchain agent needs a real-time, USD-denominated gas cost estimate for Base L2 before executing a transaction. It is especially valuable for cost-gating logic (e.g. only trade if gas < $X) or for comparing L1 vs L2 execution costs on the fly. Requires no API key — payment is per-call via x402 USDC micropayment on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:41:55.332Z","isFirstParty":false,"canonicalSlug":"base-gas-price-oracle-x402-1a4b40b0"}