Skip to main content

eth_feeHistory

Returns historical gas information on Immutable for fee estimation.

Use Cases#

  • Fee prediction - Estimate future gas prices based on history
  • Gas analytics - Analyze fee trends over time
  • Optimal timing - Find best times for transactions on Web3 gaming (Gods Unchained, RavenQuest), gaming NFTs with enforced royalties, and cross-chain game assets

Parameters#

ParameterTypeRequiredDescription
blockCountQUANTITYYesNumber of blocks in the range
newestBlockQUANTITY|TAGYesHighest block of the range
rewardPercentilesArrayYesPercentiles to sample for priority fees

Request#

{
"jsonrpc": "2.0",
"method": "eth_feeHistory",
"params": ["0x5", "latest", [25, 50, 75]],
"id": 1
}

Code Examples#

curl -X POST https://api-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_feeHistory",
"params": ["0x5", "latest", [25, 50, 75]],
"id": 1
}'