{"uid":"cap_k-LiF23LCcZzN08Xnc2F0","slug":"blockchain-fee-history-api-359f1de4","name":"Blockchain Fee History API","description":"Use when you need recent base fees and priority fee percentiles on Base, Ethereum, Arbitrum, Optimism or Polygon to pick a fee: returns the last N blocks (1 to 20) with base fee, gas used ratio and 25/50/75 percentile tips in gwei.","url":"https://biosfera.46-62-215-147.sslip.io/o/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":{"enum":["base","ethereum","arbitrum","optimism","polygon"],"type":"string"},"blocks":{"type":"integer","maximum":20,"minimum":1}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0015","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.0015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7cnCsQlSbUoT6jcat_8l5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns recent base fees, gas used ratios, and 25/50/75 percentile priority fee tips (in gwei) for the last N blocks on Base, Ethereum, Arbitrum, Optimism, or Polygon.","exampleAgentPrompt":"What have the base fees and priority fee percentiles looked like over the last 5 blocks on Ethereum? I want to know the 25th, 50th, and 75th percentile tips so I can set a good gas price for my transaction.","exampleUseCases":[{"title":"Optimal gas fee for DeFi transaction","prompt":"I'm about to send a transaction on Base — can you pull the last 10 blocks of fee history and tell me what priority tip I should use based on the 50th percentile?"},{"title":"Compare fee trends across chains","prompt":"Show me the base fee and gas used ratio for the last 15 blocks on Arbitrum and Optimism so I can decide which chain is cheaper to use right now."},{"title":"Automated fee estimation for wallet app","prompt":"Fetch the fee history for the last 20 blocks on Polygon and give me the 25th, 50th, and 75th percentile priority tips in gwei so I can recommend a fee tier to my user."}],"resultDescription":"A list of up to 20 recent blocks, each containing the base fee (in gwei), gas used ratio, and 25th/50th/75th percentile priority fee tips (in gwei), for the requested EVM-compatible chain.","failureModes":["Invalid or unsupported chain name returns an error","blocks parameter out of range (below 1 or above 20) returns a validation error","RPC node unavailability for the requested chain may cause a timeout or 503 error","Missing required 'chain' query parameter returns a 400 bad request"],"whenToPreferThis":"Choose this endpoint when you need historical fee context — multiple blocks of base fee trends and priority fee percentile distributions — rather than just a single current gas price snapshot. It is ideal for fee estimation logic, dynamic tip selection, or analytics dashboards across Base, Ethereum, Arbitrum, Optimism, or Polygon.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T12:51:58.605Z","isFirstParty":false,"canonicalSlug":"blockchain-fee-history-api-359f1de4"}