{"uid":"cap_eybi0vFsyw-zOsaGf4oJ2","slug":"onchain-toolkit-gas-price-api-678b7272","name":"Onchain Toolkit Gas Price API","description":"Live gas price on Ethereum, Base, Arbitrum, Optimism or Polygon, in gwei plus the cost of a plain transfer. Compare several chains in one call.","url":"https://onchain-toolkit.bowling-anthony.workers.dev/gas","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"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"chains":[{"chain":"base","gasPriceGwei":0.006}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4_kaGo43C6WllFcENtDLV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns live gas prices in gwei plus the cost of a plain ETH transfer for Ethereum, Base, Arbitrum, Optimism, and Polygon, with multi-chain comparison in a single call.","exampleAgentPrompt":"What are the current gas prices on Ethereum, Base, Arbitrum, Optimism, and Polygon — give me the gwei price and the cost of a plain transfer for each chain so I can pick the cheapest one?","exampleUseCases":[{"title":"Pick cheapest chain before bridging","prompt":"Before I bridge my ETH, can you check live gas prices across Ethereum, Base, Arbitrum, Optimism, and Polygon and tell me which chain will cost the least for a plain transfer right now?"},{"title":"Monitor gas spikes for DeFi bot","prompt":"My trading bot needs to know if Ethereum gas is above 30 gwei right now — can you fetch the current gas price on Ethereum and tell me the gwei value and what a plain transfer would cost?"},{"title":"Compare L2 fees for wallet UX","prompt":"I'm building a wallet and want to show users a fee comparison — can you pull the current gas price in gwei and plain transfer cost for Base, Arbitrum, and Optimism in one shot?"}],"resultDescription":"Returns a JSON object with an array of chain entries, each containing the chain name and current gas price in gwei, plus the estimated cost of a standard ETH transfer on that chain.","failureModes":["Chain RPC node is temporarily unavailable, returning a partial or empty response","Network timeout if an upstream EVM node is slow","Invalid or unsupported chain name in query params returns an error or empty result","Rate limiting if called excessively without payment"],"whenToPreferThis":"Use this endpoint when you need real-time gas prices across one or more EVM-compatible chains (Ethereum, Base, Arbitrum, Optimism, Polygon) in a single lightweight call. It is particularly useful for multi-chain fee comparison, pre-flight transaction cost estimation, and automated gas monitoring workflows. Prefer this over reading gas from an RPC node directly when you want a hosted, no-setup solution that covers multiple chains simultaneously.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:35:52.421Z","isFirstParty":false}