execution
eth_feeHistory
Fee history
Returns base fees and gas usage for the requested block range — input for EIP-1559 fee estimation.POST
https://eth.rpc.pinax.network/v1/<API_KEY>/
Required parameters
| Name | Type | Description |
|---|---|---|
blockCountrequired | hex | Number of blocks to look back (hex, max 1024). e.g. 0x5 |
newestBlockrequired | block | Newest block in the range. e.g. latest |
Optional parameters
| Name | Type | Description |
|---|---|---|
rewardPercentiles | json | JSON array of percentiles (0-100) to compute reward values for. e.g. [25,50,75] |
Request body
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_feeHistory",
"params": [
"0x5",
"latest",
"[25,50,75]"
]
}Response
200 OKObject with `baseFeePerGas`, `gasUsedRatio`, and optional `reward`.
{ "jsonrpc": "2.0", "id": 1, "result": { "oldestBlock": "0x14a2bfa", "baseFeePerGas": [ "0x3a3529440", "0x39d8a4a10", "0x3a8c1b290", "0x3b1abf3a0", "0x3a78b8c80", "0x3a04bc320" ], "gasUsedRatio": [ 0.42, 0.51, 0.49, 0.45, 0.5 ], "reward": [ [ "0x3b9aca00", "0x77359400", "0xee6b2800" ] ] } }