For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_feeHistory

POST https://mainnet.valuechain.xyz

Returns historical gas fee data for a range of recent blocks.

Parameters

Name
Type
Required
Description

blockCount

quantity

Yes

Number of blocks in the requested range.

newestBlock

quantity or tag

Yes

Highest block in the range: hex number, or earliest, latest, safe, finalized, or pending. See block tags.

rewardPercentiles

number[]

No

Priority-fee percentiles to include in reward.

Result

Fee history (object): oldestBlock, baseFeePerGas, gasUsedRatio, and optional reward.

Example

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "oldestBlock": "0xd81ea3",
    "baseFeePerGas": [
      "0xf4240",
      "0xf4240",
      "0xf4240",
      "0xf4240",
      "0xf4240"
    ],
    "gasUsedRatio": [
      0.007345866666666667,
      0.0007,
      0.0007,
      0.0007
    ],
    "reward": [
      [
        "0x7a1200",
        "0x7a1200"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ]
  }
}

Code examples

cURL

JavaScript

Python

Last updated