eth_feeHistory
Transaction fee history
Ethereum specification · All supported methods
Parameters
Parameters are positional, in the order below.
| Parameter | Type | Required | Description |
|---|---|---|---|
blockCount | Hexadecimal quantity | Yes | Requested range of blocks. Clients will return less than the requested range if not all blocks are available. |
newestBlock | Block number or tag | Yes | Highest block of the requested range. |
rewardPercentiles | rewardPercentiles | Yes | A monotonically increasing list of percentile values. For each block in the requested range, the transactions will be sorted in ascending order by effective tip per gas and the corresponding effective tip for the percentile will be determined, accounting for gas consumed. |
Return value
An object containing the returned block range’s base fees, gas usage ratios, and requested priority-fee percentiles.
The returned object includes these fields:
| Field | Type | Description |
|---|---|---|
oldestBlock | Hexadecimal quantity | Lowest number block of returned range. |
baseFeePerGas | baseFeePerGasArray | An array of block base fees per gas. 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. |
baseFeePerBlobGas | baseFeePerBlobGasArray | An array of block base fees per blob gas. 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. |
gasUsedRatio | gasUsedRatio | An array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit. |
blobGasUsedRatio | blobGasUsedRatio | An array of block blob gas used ratios. These are calculated as the ratio of blobGasUsed and the max blob gas per block. |
reward | rewardArray | A two-dimensional array of effective priority fees per gas at the requested block percentiles. |
Example
Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.
sh
curl -X POST "<gateway-url>/<service-url>" \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_feeHistory","params":["0x5","latest",[20,30]]}'Illustrative response; values depend on the selected network and request:
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestblock": "0x10b52f",
"baseFeePerGas": [
"0x3fa63a3f",
"0x37f999ee",
"0x3e36f20a",
"0x4099f79a",
"0x430d532d",
"0x46fcd4a4"
],
"baseFeePerBlobGas": [
"0x7b7609c19",
"0x6dbe41789",
"0x7223341d4",
"0x6574a002c",
"0x7223341d4",
"0x6574a002c"
],
"gasUsedRatio": [
0.017712333333333333,
0.9458865666666667,
0.6534561,
0.6517375666666667,
0.7347769666666667
],
"blobGasUsedRatio": [
0.0,
0.6666666666666666,
0.0,
1.0,
0.0
],
"reward": [
[
"0x3b9aca00",
"0x59682f00"
],
[
"0x3a13012",
"0x3a13012"
],
[
"0x3a13012",
"0x3a13012"
],
[
"0xf4240",
"0xf4240"
],
[
"0xf4240",
"0xf4240"
]
]
}
}Direct behavior
Requests for older chain data are automatically routed to providers with full chain history. This covers blocks, transactions, receipts, and logs independently of historical account state.
Requests using latest follow Direct’s reference-block rules. The selected reference is preserved during recovery; separate requests can see a newer reference.
Limits
Request 1–1,024 blocks and up to 100 reward percentiles, in ascending order with values from 0 through 100.
The API permits a shorter returned history. Direct preserves that behavior and the actual oldestBlock; it does not fabricate missing reward data. Recovery preserves the selected end block and requested range.
For providers
Support the required recent chain-history service. Advertise full chain history only when all included method families and lookup indexes work back to genesis.
See provider qualification for checks and continued eligibility.