Coinbase Wallet SDK
eth_feeHistory
Get historical gas fee information for a range of blocks
Defined in EIP-1559
Returns a collection of historical gas information from which you can recompute gas costs and estimate future gas prices.
Parameters
Number of blocks in the requested range, as a hexadecimal string.
Highest block number in the requested range (hexadecimal) or “latest”.
Array of percentile values to sample from each block’s effective priority fees.
Returns
Fee history data object containing gas information.
Error Handling
Code | Message | Description |
---|---|---|
-32602 | Invalid params | Invalid block count, block number, or percentiles |
4100 | Requested method not supported | The method is not supported by the wallet |
This method is useful for implementing dynamic fee estimation algorithms and understanding network congestion patterns.