Skip to main content

eth_feeHistory

Returns historical gas information on Moonbase Alpha 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 EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification

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-moonbase-alpha.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
}'