getFeeHistory
Retrieve historical gas fee data for Ethereum blocks, including percentiles of priority fees, to analyze and optimize transaction costs.
Instructions
Get historical gas fee info
Input Schema
Name | Required | Description | Default |
---|---|---|---|
blockCount | Yes | 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. | |
chainId | Yes | ||
rewardPercentiles | No | 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. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"blockCount": {
"description": "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.",
"type": "number"
},
"chainId": {
"type": "number"
},
"rewardPercentiles": {
"description": "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.",
"items": {
"type": "number"
},
"type": "array"
}
},
"required": [
"blockCount",
"chainId"
],
"type": "object"
}