getFeeHistory
Returns a collection of historical gas information.
Usage
import { } from './client'
const = await .({
: 4,
: [25, 75]
})Returns
The fee history.
Parameters
blockCount
- Type:
number
Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.
const = await .({
: 4,
: [25, 75]
})rewardPercentiles
- Type:
number[]
A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used.
const = await .({
: 4,
: [25, 75]
})blockNumber (optional)
- Type:
number
Highest number block of the requested range.
const = await .({
: 4,
: 1551231n,
: [25, 75]
})blockTag (optional)
- Type:
'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' - Default:
'latest'
Highest number block of the requested range.
const = await .({
: 4,
: 'safe',
: [25, 75]
})JSON-RPC Method
- Calls
eth_feeHistory.