{"uid":"cap_f8-BrTYIEgo4-MqInQ4rr","slug":"saylor-innovations-data-desk-evm-gas-fee-history-ce9300dd","name":"Saylor Innovations Data Desk – EVM Gas Fee History","description":"Gas fee history for 16 EVM chains over up to 100 recent blocks: base fee, block fullness and priority tip at chosen percentiles for each block.","url":"https://saylorinnovations.com/api/chain/fee-history?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","required":["chain"],"properties":{"chain":{"type":"string","description":"chain name (ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, gnosis, linea, scroll, mantle, blast, sonic, celo, berachain, unichain) or chain id"},"blocks":{"type":"string","description":"optional number of recent blocks, 1 to 100 (default 20)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["chain","chain_id","blocks","next_block_base_fee_gwei","avg_base_fee_gwei","history","note","source"],"properties":{"note":{"type":"string","description":"plain-language reading of the result, including units"},"chain":{"type":"string","description":"the chain name that was queried"},"blocks":{"type":"number","description":"blocks in the history"},"source":{"type":"string","description":"where the data was read from"},"history":{"type":["array","null"],"items":{"type":"object","properties":{"block":{"type":["number","null"],"description":"block number"},"tip_p10_gwei":{"type":["number","null"],"description":"10th percentile priority tip, gwei"},"tip_p50_gwei":{"type":["number","null"],"description":"median priority tip, gwei"},"tip_p90_gwei":{"type":["number","null"],"description":"90th percentile priority tip, gwei"},"base_fee_gwei":{"type":["number","null"],"description":"base fee of that block, gwei"},"gas_used_ratio":{"type":["number","null"],"description":"share of the gas limit used"}}},"description":"one entry per block, oldest first"},"chain_id":{"type":"number","description":"EIP-155 chain id of that network"},"percentiles":{"type":["array","null"],"description":"tip percentiles requested"},"avg_tip_gwei":{"type":["number","null"],"description":"average priority tip at the middle percentile"},"newest_block":{"type":"number","description":"last block in the history"},"oldest_block":{"type":"number","description":"first block in the history"},"avg_base_fee_gwei":{"type":"number","description":"average base fee over the history"},"max_base_fee_gwei":{"type":"number","description":"highest base fee in the history"},"min_base_fee_gwei":{"type":"number","description":"lowest base fee in the history"},"avg_gas_used_ratio":{"type":["number","null"],"description":"average share of the gas limit used"},"tip_percentile_used":{"type":"string","description":"percentile used for avg_tip_gwei"},"next_block_base_fee_gwei":{"type":"number","description":"protocol base fee for the next block, gwei"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NO-8YeWR22RJ6NMus3lM4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns base fee, block fullness, and priority tip percentiles for up to 100 recent blocks across 16 EVM-compatible chains","exampleAgentPrompt":"What does the gas fee history look like on Arbitrum for the last 50 blocks — give me base fees, block fullness, and the median priority tip for each block.","exampleUseCases":[{"title":"Optimal transaction timing on Ethereum","prompt":"I want to time my Ethereum transaction to land when gas is cheap — can you pull the base fee and block fullness for the last 100 blocks so I can see if fees are trending down?"},{"title":"DeFi bot gas cost estimation","prompt":"My trading bot needs to know the 10th and 90th percentile priority tips on Base for the last 20 blocks so it can set a competitive but not wasteful max fee — can you fetch that?"},{"title":"Multi-chain gas comparison","prompt":"Can you grab the average base fee and recent block fullness for Optimism and Polygon over the last 30 blocks each? I'm trying to figure out which chain is cheaper to deploy on right now."}],"resultDescription":"A JSON object containing the chain name, chain ID, number of blocks analyzed, next-block base fee estimate (gwei), average base fee (gwei), and a per-block history array (oldest first) where each entry includes the block number, base fee, gas used ratio, and priority tip at the 10th, 50th, and 90th percentiles. Also includes a plain-language 'note' field summarizing the result and a 'source' field indicating the data origin.","failureModes":["Unknown or unsupported chain name/ID returns an error — use one of the 16 supported chain names or their EIP-155 chain ID","Blocks value out of range (less than 1 or greater than 100) returns a validation error","RPC node unavailability for a specific chain may cause a null or partial history response","Missing required 'chain' query parameter returns a 400-level error"],"whenToPreferThis":"Choose this endpoint when you need per-block granularity of EVM gas fee data across multiple chains without setting up your own RPC connections. It covers 16 chains in one unified API, returns structured gwei values with percentile tips, and includes a plain-language interpretation — making it ideal for AI agents that need to reason about gas costs, time transactions, or compare chains without parsing raw RPC output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T07:22:06.470Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-data-desk-evm-gas-fee-history-3b396c80"}