Skip to main content
Returns historical base fees, gas usage ratios, and priority fee percentiles for a range of blocks. Useful for building accurate EIP-1559 fee estimates.

Parameters

blockCount
string | number
required
Number of blocks to include in the history. Must be between 1 and 1024. Can be a decimal integer or a hex string (e.g., 4 or "0x4").
newestBlock
string
required
The newest block in the requested range. Block number in hexadecimal, or a block tag: latest, safe, or finalized.
rewardPercentiles
array
Optional. An array of percentile values between 0 and 100. For each block, the node returns the effective priority fee at each percentile from the transactions in that block. For example, [25, 50, 75] returns 25th, 50th, and 75th percentile values.

Returns

result
object
Fee history data for the requested range.

Example

{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [4, "latest", [25, 75]],
  "id": 1
}