eth_feeHistory
eth_feeHistory
Returns the base fee per gas, gas used ratio, blob base fee per gas (EIP-4844), blob gas used ratio (EIP-4844), and optionally per-block reward percentiles for the requested block range. Used to estimate appropriate gas prices and tip values.
The response arrays are sized relative to blockCount:
baseFeePerGasandblobBaseFeePerGashave lengthblockCount + 1(one extra entry for the next block).gasUsedRatioandblobGasUsedRatiohave lengthblockCount.reward(whenrewardPercentilesis provided) has lengthblockCount; each entry is an array with one value per requested percentile.
⚡ Compute Units: 10 CU
Request
Number of blocks in the requested range (1-1024). Hex-encoded.
Optional. Array of monotonically increasing percentile values [0, 100]. When provided, the response includes reward with the effective priority fee at each percentile for each block.
Response
Base fee per gas for each block, plus the next block's base fee. Length = blockCount + 1.
Ratio of gas used to gas limit for each block. Length = blockCount.
EIP-4844 blob base fee per gas for each block, plus the next block's. Length = blockCount + 1. Returned by post-Dencun nodes.
EIP-4844 ratio of blob gas used to the per-block target for each block. Length = blockCount. Returned by post-Dencun nodes.
Effective priority fee (tip) per gas at each requested percentile, per block. Only present when rewardPercentiles is supplied. Outer length = blockCount, inner length = rewardPercentiles.length.