eth_feeHistory
eth_feeHistory JSON-RPC reference for MegaETH.
Summary
Returns historical gas fee data for a range of blocks.
The public MegaETH endpoint supports this method. The standard, node, and gateway layers below identify behavior that differs from a generic Ethereum endpoint.
Parameters
blockCount Quantity REQUIRED
Number of blocks (1–256).
newestBlock string REQUIRED
Hex block number or tag: latest, safe, finalized, earliest, pending.
rewardPercentiles number[]
Monotonically increasing values from 0 to 100; omit to exclude reward from the result.
Result
oldestBlockQuantityFirst block in the returned range.
baseFeePerGasQuantity[]Base fee per block; length is
blockCount + 1.gasUsedRationumber[]Gas utilization ratio per block.
rewardQuantity[][]Percentile reward values; present only when
rewardPercentileswas provided.baseFeePerBlobGasQuantity[]Blob base fee per block when available.
blobGasUsedRationumber[]Blob gas utilization ratio per block when available.
Comparison with Ethereum Standard JSON-RPC
Ethereum Standard
The canonical Ethereum method uses the parameter and result contract documented above, including the stated null, false, or zero-value semantics where applicable.
MegaETH Node Behavior
The node implements the standard fee-history shape. The public gateway does not forward this method to the node, so node-derived fee history must not be inferred from public results.
MegaETH Public Gateway
The gateway synthesizes this response locally instead of querying a node. It accepts 1 to 256 blocks and currently fills the response with a 1,000,000-wei base fee, 0.1 gas-used ratio, 1-wei blob base fee, zero blob utilization, and zero rewards. Treat these as gateway policy values, not measured historical blocks.
Errors
The | Scope | column distinguishes method failures from gateway policy errors.
-32602
Request
Invalid params
Invalid request shape or blockCount outside the allowed range
-32005
Transport/policy
Rate limit exceeded
The caller exceeds the public gateway's simple read budget.
-32099
Transport/policy
Payload too large
The request body exceeds the 128 KiB public endpoint limit.
See also Error Codes.
Examples
Endpoint: https://mainnet.megaeth.com/rpc
Capture date: July 27, 2026
Outcome: success
Sources
Spec:
[email protected]:ethereum/execution-apis.git @ d24f58b56dcd16ab0f0c70ec609bcc1c42750b51: src/eth/fee_market.yamlCode:
[email protected]:megaeth-labs/mega-reth.git @ ab60376631228edab3a6df180f295280bad26e93: crates/rpc/rpc-eth-api/src/core.rsCode:
[email protected]:megaeth-labs/mega-rpc.git @ 06aa35aa95d569c227cc25d2aa12834eb0458aa0: workers/src/processors/fee-history-processor.tsProbe: MegaETH Mainnet public endpoint, July 27, 2026
Last updated