{"uid":"cap_caW5zQtJjnoRWsFAtFlcM","slug":"chainray-online-bc90147a","name":"ChainRay Gas Fee Predictor","description":"The most complete blockchain data and intelligence service for AI agents. 93 endpoints across 46 chains, from gas fees to DeFi analytics, with real-time streams, intent routing, and verifiable proofs. Pay-per-request via x402.","url":"https://chainray.online/gas-predict","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":{"chain":{"type":"string","description":"Blockchain network (e.g., base, ethereum, polygon)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"chain":"ethereum"}}},"response":{"chain":"ethereum","stats":{"max":0.155,"min":0.108,"avg5Block":0.143,"avg20Block":0.127,"volatility":"10.643%","sampledBlocks":20},"trend":{"direction":"RISING","changePercent":11.906},"_proof":{"chain":"ethereum","dataHash":"4cef21a0ebb9e220d4805d6b4d451a03c333e48cdad496acf0daebca3f3e5e17","blockHash":"0xb973663ffddb2effc04c657cf6066df1f81547a6fbe8a9055eeb5409b5a90825","chainName":"Ethereum","blockNumber":25306097,"analysisHash":"930b6182d8015e853b0f81c4df5a6d0f0539ce884df907f9ea84c1f070971e49","proofVersion":"3.0","blockTimestamp":1781324075,"proofTimestamp":1781324085588},"current":{"unit":"Gwei","baseFee":0.139},"forecast":{"low":0.108,"mid":0.138,"high":0.185,"note":"Based on statistical trend of last 20 real blocks, not speculative","unit":"Gwei","horizon":"5-20 blocks (~60-240s)"},"timestamp":1781324085546,"dataSource":"on-chain","methodology":"Gas Trend v1.0 — reads actual baseFee from last 20 blocks. Moving average + coefficient of variation. Zero external APIs.","recommendation":"Send now — gas prices rising"}},"exampleRequest":{"chain":"ethereum"},"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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_oLxvyRC4rMLWR5lKj9TnO","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":"Predicts near-term gas fees for a specified blockchain network to help set optimal transaction gas prices.","exampleAgentPrompt":"What gas price should I set for my next transaction on Base — can you predict where fees are heading in the near term?","exampleUseCases":[{"title":"Optimize DeFi swap execution timing","prompt":"I'm about to swap tokens on Ethereum but want to catch a low gas window — what do you predict gas fees will look like over the next 15 minutes?"},{"title":"Batch transactions across multiple chains","prompt":"Help me figure out which chain to use for my transaction next — can you predict gas costs on both Polygon and Arbitrum so I pick the cheapest option?"},{"title":"Smart contract deployment cost planning","prompt":"I'm deploying a contract on Ethereum tomorrow during morning hours — what should I expect gas fees to be, and what price would you recommend I set?"}],"resultDescription":"Returns a predicted near-term gas fee estimate for the specified blockchain network, helping callers set an optimal gas price before submitting a transaction.","failureModes":["Unsupported chain name returns an error or empty result","Missing required chain parameter may return a default or error","Network connectivity issues to ChainRay API return HTTP errors","Payment failure via x402 protocol returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a forward-looking gas fee prediction (not just current gas) for a specific chain like Base, Ethereum, or Polygon, especially before submitting time-sensitive blockchain transactions where overpaying or underpaying gas is costly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:46:33.192Z","isFirstParty":false}