Parameters
blockCountstring | numberrequired- Number of blocks in the range, up to 1024.
newestBlockstringrequired- Highest block of the range: hex number or tag.
rewardPercentilesarrayoptional- Increasing percentiles of priority fees to sample per block, e.g. [25, 75].
Returns
object Fee history.
oldestBlockstring- First block of the range, hex.
baseFeePerGasarray- Base fee per block, plus the next block's.
gasUsedRatioarray- gasUsed / gasLimit per block.
rewardarray- Priority fees at the requested percentiles per block.
When to use it
Read base fees, block fullness and tip percentiles for a range of blocks, for fee estimation or historical gas analytics.
How to read the result
baseFeePerGas has one more entry than the range: the last value is the base fee of the next block.
reward[i] holds the requested percentiles of tips paid in block i.
Tips
- With a historical newestBlock you can chart gas markets at any point in time.