{"uid":"cap_R4yfbvH7SBV3raMJdpWAW","slug":"chainray-online-a972990c","name":"ChainRay Gas History","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-history","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":{"note":"Sampled data, not per-block values. Gas values represent block base fees.","chain":"ethereum","stats":{"avg":"0.1305","max":"0.1622","min":"0.1104","unit":"gwei","current":"0.1386"},"_proof":{"chain":"ethereum","dataHash":"bb741e8fbc9292f6202bcb7270df1c930723dc5e648e645307892a22fd329d04","blockHash":"0x8699e575fad59523076ee714925cf5f86a9a3fcc449be127c200abfc224a9f4f","chainName":"Ethereum","blockNumber":25306098,"proofVersion":"3.0","blockTimestamp":1781324087,"proofTimestamp":1781324100143},"period":"360 minutes (6.0h)","samples":[{"time":"2026-06-12T22:23:35.000Z","index":35,"gasUsed":58756734,"txCount":528,"gasLimit":59999943,"timestamp":1781303015,"baseFeeGwei":0.110375577,"blockNumber":25304348,"utilization":97.92},{"time":"2026-06-12T22:33:35.000Z","index":34,"gasUsed":12572907,"txCount":149,"gasLimit":60000000,"timestamp":1781303615,"baseFeeGwei":0.160115492,"blockNumber":25304398,"utilization":20.95},{"time":"2026-06-12T22:43:35.000Z","index":33,"gasUsed":31893777,"txCount":281,"gasLimit":60000000,"timestamp":1781304215,"baseFeeGwei":0.13436322,"blockNumber":25304448,"utilization":53.15},{"time":"2026-06-12T22:53:35.000Z","index":32,"gasUsed":22381743,"txCount":300,"gasLimit":60000000,"timestamp":1781304815,"baseFeeGwei":0.134317259,"blockNumber":25304498,"utilization":37.3},{"time":"2026-06-12T23:03:35.000Z","index":31,"gasUsed":16012819,"txCount":199,"gasLimit":60000000,"timestamp":1781305415,"baseFeeGwei":0.148682872,"blockNumber":25304548,"utilization":26.68},{"time":"2026-06-12T23:13:35.000Z","index":30,"gasUsed":23179477,"txCount":258,"gasLimit":59941408,"timestamp":1781306015,"baseFeeGwei":0.140945706,"blockNumber":25304598,"utilization":38.67},{"time":"2026-06-12T23:23:35.000Z","index":29,"gasUsed":29229405,"txCount":254,"gasLimit":60000000,"timestamp":1781306615,"baseFeeGwei":0.144205264,"blockNumber":25304648,"utilization":48.71},{"time":"2026-06-12T23:33:35.000Z","index":28,"gasUsed":46211825,"txCount":236,"gasLimit":60000000,"timestamp":1781307215,"baseFeeGwei":0.127321931,"blockNumber":25304698,"utilization":77.01},{"time":"2026-06-12T23:43:35.000Z","index":27,"gasUsed":24699295,"txCount":342,"gasLimit":60000000,"timestamp":1781307815,"baseFeeGwei":0.12216478,"blockNumber":25304748,"utilization":41.16},{"time":"2026-06-12T23:53:47.000Z","index":26,"gasUsed":37670484,"txCount":345,"gasLimit":60000000,"timestamp":1781308427,"baseFeeGwei":0.129886859,"blockNumber":25304798,"utilization":62.78},{"time":"2026-06-13T00:03:47.000Z","index":25,"gasUsed":19082228,"txCount":265,"gasLimit":60000000,"timestamp":1781309027,"baseFeeGwei":0.147671524,"blockNumber":25304848,"utilization":31.8},{"time":"2026-06-13T00:13:47.000Z","index":24,"gasUsed":58753482,"txCount":430,"gasLimit":60000000,"timestamp":1781309627,"baseFeeGwei":0.13933296,"blockNumber":25304898,"utilization":97.92},{"time":"2026-06-13T00:23:47.000Z","index":23,"gasUsed":19678248,"txCount":135,"gasLimit":60000000,"timestamp":1781310227,"baseFeeGwei":0.146336868,"blockNumber":25304948,"utilization":32.79},{"time":"2026-06-13T00:33:47.000Z","index":22,"gasUsed":56529816,"txCount":264,"gasLimit":60000000,"timestamp":1781310827,"baseFeeGwei":0.120031921,"blockNumber":25304998,"utilization":94.21},{"time":"2026-06-13T00:43:59.000Z","index":21,"gasUsed":54462360,"txCount":110,"gasLimit":60000000,"timestamp":1781311439,"baseFeeGwei":0.137203638,"blockNumber":25305048,"utilization":90.77},{"time":"2026-06-13T00:53:59.000Z","index":20,"gasUsed":21653681,"txCount":215,"gasLimit":59999943,"timestamp":1781312039,"baseFeeGwei":0.123123816,"blockNumber":25305098,"utilization":36.08},{"time":"2026-06-13T01:04:11.000Z","index":19,"gasUsed":11835482,"txCount":335,"gasLimit":60000000,"timestamp":1781312651,"baseFeeGwei":0.145944118,"blockNumber":25305148,"utilization":19.72},{"time":"2026-06-13T01:14:11.000Z","index":18,"gasUsed":56556413,"txCount":998,"gasLimit":60000000,"timestamp":1781313251,"baseFeeGwei":0.111078471,"blockNumber":25305198,"utilization":94.26},{"time":"2026-06-13T01:24:11.000Z","index":17,"gasUsed":44710006,"txCount":671,"gasLimit":60000000,"timestamp":1781313851,"baseFeeGwei":0.119842184,"blockNumber":25305248,"utilization":74.51},{"time":"2026-06-13T01:34:11.000Z","index":16,"gasUsed":40460990,"txCount":377,"gasLimit":60000000,"timestamp":1781314451,"baseFeeGwei":0.111807395,"blockNumber":25305298,"utilization":67.43},{"time":"2026-06-13T01:44:11.000Z","index":15,"gasUsed":18824862,"txCount":160,"gasLimit":60000000,"timestamp":1781315051,"baseFeeGwei":0.162169425,"blockNumber":25305348,"utilization":31.37},{"time":"2026-06-13T01:54:11.000Z","index":14,"gasUsed":57313702,"txCount":438,"gasLimit":60000000,"timestamp":1781315651,"baseFeeGwei":0.135265645,"blockNumber":25305398,"utilization":95.52},{"time":"2026-06-13T02:04:11.000Z","index":13,"gasUsed":53326378,"txCount":757,"gasLimit":59882759,"timestamp":1781316251,"baseFeeGwei":0.117809304,"blockNumber":25305448,"utilization":89.05},{"time":"2026-06-13T02:14:11.000Z","index":12,"gasUsed":22499606,"txCount":205,"gasLimit":59941408,"timestamp":1781316851,"baseFeeGwei":0.134906375,"blockNumber":25305498,"utilization":37.53},{"time":"2026-06-13T02:24:11.000Z","index":11,"gasUsed":29813831,"txCount":104,"gasLimit":59882873,"timestamp":1781317451,"baseFeeGwei":0.12075604,"blockNumber":25305548,"utilization":49.78},{"time":"2026-06-13T02:34:11.000Z","index":10,"gasUsed":25576116,"txCount":443,"gasLimit":60000000,"timestamp":1781318051,"baseFeeGwei":0.132403343,"blockNumber":25305598,"utilization":42.62},{"time":"2026-06-13T02:44:11.000Z","index":9,"gasUsed":17444516,"txCount":88,"gasLimit":60000000,"timestamp":1781318651,"baseFeeGwei":0.117249792,"blockNumber":25305648,"utilization":29.07},{"time":"2026-06-13T02:54:23.000Z","index":8,"gasUsed":26966208,"txCount":159,"gasLimit":60000000,"timestamp":1781319263,"baseFeeGwei":0.126017387,"blockNumber":25305698,"utilization":44.94},{"time":"2026-06-13T03:04:23.000Z","index":7,"gasUsed":5603360,"txCount":52,"gasLimit":60000000,"timestamp":1781319863,"baseFeeGwei":0.137485731,"blockNumber":25305748,"utilization":9.33},{"time":"2026-06-13T03:14:35.000Z","index":6,"gasUsed":41797956,"txCount":193,"gasLimit":60000000,"timestamp":1781320475,"baseFeeGwei":0.117152574,"blockNumber":25305798,"utilization":69.66},{"time":"2026-06-13T03:24:47.000Z","index":5,"gasUsed":25304118,"txCount":381,"gasLimit":60000000,"timestamp":1781321087,"baseFeeGwei":0.117507163,"blockNumber":25305848,"utilization":42.17},{"time":"2026-06-13T03:34:47.000Z","index":4,"gasUsed":29747936,"txCount":294,"gasLimit":60000000,"timestamp":1781321687,"baseFeeGwei":0.127305549,"blockNumber":25305898,"utilization":49.57},{"time":"2026-06-13T03:44:47.000Z","index":3,"gasUsed":20606220,"txCount":579,"gasLimit":60000000,"timestamp":1781322287,"baseFeeGwei":0.121329277,"blockNumber":25305948,"utilization":34.34},{"time":"2026-06-13T03:54:47.000Z","index":2,"gasUsed":19194904,"txCount":547,"gasLimit":60000000,"timestamp":1781322887,"baseFeeGwei":0.112342337,"blockNumber":25305998,"utilization":31.99},{"time":"2026-06-13T04:04:47.000Z","index":1,"gasUsed":16220225,"txCount":222,"gasLimit":60000000,"timestamp":1781323487,"baseFeeGwei":0.125054089,"blockNumber":25306048,"utilization":27.03},{"time":"2026-06-13T04:14:47.000Z","index":0,"gasUsed":28023108,"txCount":385,"gasLimit":60000000,"timestamp":1781324087,"baseFeeGwei":0.138606525,"blockNumber":25306098,"utilization":46.7}],"chainName":"Ethereum","timestamp":1781324100142,"dataPoints":36,"failedSamples":0,"sampleInterval":"Every 50 blocks (~10min)"}},"exampleRequest":{"chain":"ethereum"},"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ldbuzNE95po33GvNAd3Ez","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns historical gas fee data and time-series for a specified blockchain network","exampleAgentPrompt":"Pull up the historical gas fee time-series data for the Base chain from ChainRay so I can see how transaction costs have trended.","exampleUseCases":[{"title":"Optimize transaction timing for cost savings","prompt":"Check the historical gas fee patterns on Ethereum over the last month so I can figure out the best times to batch my transactions and save on fees."},{"title":"Compare network costs across chains","prompt":"Get me the gas fee time-series data for both Polygon and Ethereum so I can see which network has been cheaper for our users' transactions lately."},{"title":"Model DeFi protocol economics accurately","prompt":"Pull the historical gas fee trends for Base chain over the past three months so I can factor real transaction cost patterns into our protocol's profitability analysis."}],"resultDescription":"A time-series dataset of historical gas fees for the specified blockchain network, including gas price data points over time (e.g., gwei values, timestamps, and fee statistics for the requested chain such as Base or Ethereum).","failureModes":["Unsupported chain identifier returns an error or empty dataset","Missing or malformed chain query parameter may default to a specific chain or return a 400 error","Payment not processed (x402 flow) results in a 402 Payment Required response","Rate limiting or quota exceeded returns a 429 error","Chain data temporarily unavailable returns a 503 or empty response"],"whenToPreferThis":"Use this endpoint when you need historical gas fee data or time-series trends for a specific blockchain network (especially Base, Ethereum, Polygon). Prefer this over gas prediction endpoints when you need past data rather than forecasts, and over general blockchain explorers when you specifically need structured fee history in a machine-readable format for analytics or cost modeling.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:48:25.747Z","isFirstParty":false}