eth_feeHistory

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Path parameters

apiKeystringRequired

Request

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

The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available.

newestBlockstring or enumRequired

The highest block number of the requested range, or ‘latest’ for the most recent block.

rewardPercentileslist of integersRequired

An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned.

Response

Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

oldestBlockstringOptionalformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"

The block number of the oldest block in the returned range.

baseFeePerGaslist of stringsOptional

An array of block base fees per gas in wei. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.

gasUsedRatiolist of integersOptional

An array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit.

rewardlist of lists of stringsOptional

A two-dimensional array of effective priority fees per gas at the requested reward percentiles. This property is omitted if rewardPercentiles was not specified.

baseFeePerBlobGaslist of stringsOptional

An array of block base fees per blob gas in wei. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-4844 blocks.

blobGasUsedRatiolist of integersOptional

An array of block blob gas used ratios. These are calculated as the ratio of blobGasUsed and the maximum blob gas per block.