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`: - `baseFeePerGas` and `blobBaseFeePerGas` have length `blockCount + 1` (one extra entry for the next block). - `gasUsedRatio` and `blobGasUsedRatio` have length `blockCount`. - `reward` (when `rewardPercentiles` is provided) has length `blockCount`; each entry is an array with one value per requested percentile. ⚡ Compute Units: [10 CU](https://docs.conduit.xyz/rpc-nodes/information/compute-units)

Request

This endpoint expects an object.
blockCountstringRequiredformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"

Number of blocks in the requested range (1-1024). Hex-encoded.

newestBlockenum or stringRequired
Highest block of the requested range, or one of "latest", "earliest", "pending", "finalized", "safe"
rewardPercentileslist of doublesOptional

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

Fee history object
oldestBlockstringformat: "^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$"
Lowest block number of the returned range.
baseFeePerGaslist of strings

Base fee per gas for each block, plus the next block’s base fee. Length = blockCount + 1.

gasUsedRatiolist of doubles

Ratio of gas used to gas limit for each block. Length = blockCount.

blobBaseFeePerGaslist of strings

EIP-4844 blob base fee per gas for each block, plus the next block’s. Length = blockCount + 1. Returned by post-Dencun nodes.

blobGasUsedRatiolist of doubles

EIP-4844 ratio of blob gas used to the per-block target for each block. Length = blockCount. Returned by post-Dencun nodes.

rewardlist of lists of strings

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.