eth_feeHistory
Returns a collection of historical gas information from which you can decide what to submit as your maxFeePerGas and/or maxPriorityFeePerGas.
Parameters:
Returns:
Example:
// Request
curl https://t3rn.blockpi.network/v1/rpc/your-rpc-key -X POST -H "Content-Type: application/json" --data '{"method":"eth_feeHistory","params":[4,"latest",[25,75]],"id":1,"jsonrpc":"2.0"}'
// Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestBlock": "0x311f0d",
"reward": [
[
"0x0",
"0x0"
],
[
"0x0",
"0x0"
],
[
"0x0",
"0x0"
],
[
"0x0",
"0x0"
]
],
"baseFeePerGas": [
"0x989680",
"0x989680",
"0x989680",
"0x989680",
"0x989680"
],
"gasUsedRatio": [
1,
1,
0.01047642857142857,
0.02095285714285714
]
}
}Last updated
Was this helpful?