eth_feeHistory - Mantle
eth_feeHistory. Retrieve historical gas fee data
eth_feeHistory - mantle [Value: 20CU]
Retrieves historical gas fee data for transactions, aiding in better gas price estimation and transaction planning based on past network activity
- Retrieve gas price history
- DApp Authentication: Verify user's addresses
- Account Selection UI: Populate account dropdown menus
- Requires access to historical block data
- High computational load for large data ranges
- Accuracy depends on node synchronization state
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Request
Examples
curl --request POST \
--url https://mantle.drpc.org \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_feeHistory",
"params": [
4,
4,
4
]
}Response
200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestBlock": "0x130b1e6",
"reward": [
[
"0x5041e1e",
"0xdd221b80"
],
[
"0x5041e1e",
"0xb8346df0"
],
[
"0x55d4a80",
"0xb2d05e00"
],
[
"0x4dd9818",
"0x3b9aca00"
]
],
"baseFeePerGas": [
"0x52d80a82c",
"0x50f43f659",
"0x50012de8d",
"0x4e30357d6",
"0x57efff9e7"
],
"gasUsedRatio": [
0.40875283333333334,
0.45308523333333334,
0.4091907,
0.9987537
],
"baseFeePerBlobGas": [
"0x1",
"0x1",
"0x1",
"0x1",
"0x1"
],
"blobGasUsedRatio": [
0.5,
1,
0.6666666666666666,
1
]
}
}idinteger
jsonrpcstring
methodstring
array
blockCountinteger
The number of blocks for which to retrieve fee history.
newestBlockstring
The highest block number (inclusive) to be used as the reference point. Can be a block number or a string ("latest", "pending").
rewardPercentilesarray_of_integers
(optional) A list of percentiles for which to return gas used and priority fees per block.
200
array
idinteger
jsonrpcstring
resultarray_of_strings
A list of addresses owned by the client.
array
oldestBlockint64
Base fees per gas for each block in the list.
gasUsedRatioarray_of_numbers
Ratios of gas used to gas limit for each block.
rewardarray_of_arrays_of_strings
Priority fees per gas at the specified percentiles for each block.
baseFeePerBlobGasarray_of_strings
Base fees per blob gas for each block.
blobGasUsedRatioarray_of_numbers
Ratios of blob gas used to blob gas limit for each block.