{"uid":"cap_bwdwCwAi-Nz0UUcNxNXmE","slug":"gas-price-oracle-multi-chain-blockchain-gas-cost-lookup-b84f18ff","name":"Gas Price Oracle – Multi-Chain Blockchain Gas Cost Lookup","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/gas-price-oracle?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","properties":{"gas":{"type":"integer","maximum":30000000,"minimum":21000,"examples":[200000],"description":"Optional custom gas units; result sorted by custom_usd"},"chains":{"type":"string","examples":["base,ethereum,arbitrum"],"description":"Comma list subset of base,ethereum,arbitrum,optimism,polygon,bsc (default all)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_Si5lV4G0UqZXSyHRo6uWi","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 gas prices and estimated transaction costs (transfer, ERC-20 transfer, swap) across major EVM chains, with a recommendation for the cheapest chain to execute on.","exampleAgentPrompt":"What's the cheapest EVM chain to execute a swap on right now — check Base, Ethereum, and Arbitrum and tell me the estimated USD cost for a 200,000 gas swap on each?","exampleUseCases":[{"title":"Cheapest chain routing for DeFi swap","prompt":"Before I execute this token swap, check current gas prices on Base, Arbitrum, and Optimism and tell me which one will cost the least in USD for about 150,000 gas units."},{"title":"Gas cost sanity check before ERC-20 transfer","prompt":"I'm about to send an ERC-20 token — what's the current estimated USD cost for a standard ERC-20 transfer on Base vs Ethereum right now?"},{"title":"Automated chain selection for onchain agent","prompt":"My trading bot needs to pick the cheapest chain to settle a transaction on — pull current gas prices across all supported chains and tell me which one to use and by how much it beats Ethereum mainnet."}],"resultDescription":"A JSON array of chains with gas price in gwei, USD cost estimates for transfer/ERC-20 transfer/swap, native token USD price, upstream RPC URL, latency in ms, and an L1 rollup fee flag; plus a top-level recommendation string naming the cheapest chain, a multiplier showing how much cheaper it is than Ethereum, and a timestamp.","failureModes":["Upstream RPC timeout causing stale or missing chain data","Chain subset parameter typo returns 400 or empty results","USDC payment not processed (x402 payment required, no API key fallback)","Gas price spike between call and execution making estimate stale","Unsupported chain name in 'chains' query param silently dropped or rejected"],"whenToPreferThis":"Choose this endpoint when an AI agent or trading bot needs real-time, multi-chain gas cost estimates in USD without managing API keys — ideal for autonomous onchain agents that pay per call via x402/USDC on Base. Prefer this over static gas trackers when you need cross-chain comparison and actionable USD cost estimates for specific operation types (transfer, ERC-20, swap).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:12.028Z","isFirstParty":false,"canonicalSlug":"gas-price-oracle-multi-chain-blockchain-gas-cost-lookup-b84f18ff"}