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://gnosis.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",
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.005797733333333333,
0.006671733333333333,
0.0007,
0
],
"oldestBlock": "0x189cb9a",
"reward": [
[
"0xb2d05df9",
"0xb2d05df9"
],
[
"0xb2d05df9",
"0xb2d05df9"
],
[
"0xb2d05df9",
"0xb2d05df9"
],
[
"0x0",
"0x0"
]
]
},
"id": 1
}Last updated
Was this helpful?