{"uid":"cap_NW59qLFMvjD9OegczZopx","slug":"bitcoin-fee-history-8ec3600a","name":"Bitcoin Fee History","description":"Fee rates actually paid in the last 12 Bitcoin blocks: per block the 10th to 90th percentile sat/vB, total fees, tx count, fullness and time, plus 12-block averages and the trend (Bitcoin Core getblockstats).","url":"https://diamond.btc-intel.workers.dev/api/x402/fee_history?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"properties":{"type":"string"}}},"responseSchema":{"type":"json","example":{"as_of":"2026-11-07T18:00:00Z","trend":"flat","blocks":[{"time":"2026-11-07T18:00:00Z","height":974956,"full_pct":99.8,"tx_count":3400,"total_fees_btc":0.028,"fee_rate_sat_vb":{"p10":1,"p50":2.5,"p90":8}}],"average":{"total_fees_btc":0.03,"median_fee_rate_sat_vb":2.4},"product":"fee_history"}},"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_rg0B4QWVlijcUKQ9EUU0N","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 historical Bitcoin block fee-rate data including fee percentiles, block fullness, and transaction counts over recent blocks","exampleAgentPrompt":"What have Bitcoin transaction fees been like over recent blocks — give me the fee-rate percentiles (p10, p50, p90 in sat/vb), block fullness, and whether fees are trending up, down, or flat.","exampleUseCases":[{"title":"Optimal fee timing for wallet app","prompt":"Pull the recent Bitcoin fee history so I can see whether fees are trending up or down and what the median sat/vb rate has been across the last several blocks — I want to advise users on whether to send now or wait."},{"title":"DeFi dashboard fee-rate widget","prompt":"Fetch the latest Bitcoin block fee history including p10, p50, and p90 fee percentiles and block fullness percentages so I can display a live fee-rate chart on my analytics dashboard."},{"title":"Automated fee-spike alerting","prompt":"Get me the Bitcoin fee history trend and average median fee rate right now — I want to know if fees are spiking above normal so I can trigger an alert for our transaction batching system."}],"resultDescription":"Returns a JSON object with an as_of UTC timestamp, a trend label (e.g. 'flat', 'rising', 'falling'), an array of recent block objects each containing block height, timestamp, fullness percentage, transaction count, total fees in BTC, and fee-rate percentiles (p10/p50/p90 in sat/vb), plus aggregate averages for total fees and median fee rate across the returned blocks.","failureModes":["Payment not provided or insufficient — returns 402 Payment Required","Upstream Bitcoin node unavailable — may return 503 or stale data","No blocks processed yet — could return empty blocks array","Malformed request parameters — returns 400 Bad Request"],"whenToPreferThis":"Use this endpoint when you need a recent historical view of Bitcoin fee rates across multiple blocks, including percentile distributions and block fullness, rather than just the current mempool snapshot. Prefer it over the Network Status endpoint when fee trend analysis across blocks is the goal, and over the CPFP endpoint when you don't have a specific stuck transaction to bump.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T23:38:20.945Z","isFirstParty":false,"canonicalSlug":"bitcoin-fee-history-8ec3600a"}