> For the complete documentation index, see [llms.txt](https://docs.validationcloud.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validationcloud.io/v1/hedera/json-rpc-relay-api/eth_feehistory.md).

# eth\_feeHistory

Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range.

This method will use `40` [Compute Units](/v1/about/billing.md).

***

## **Parameters**

* `blockCount` - Integer number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. If blocks in the specified block range are not available, then only the fee history for available blocks is returned.
* `newestBlock` - String representing the highest number block of the requested range, or one of the string tags `latest`, `earliest`, or `pending`.
* `rewardPercentiles` - (optional) 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.

## Returns

* `oldestBlock` - Lowest number block of the returned range expressed as a hexadecimal number.
* `baseFeePerGas` - An array of block base fees per gas, including an extra block value. The extra value is the next block after the newest block in the returned range.
* `gasUsedRatio` - An array of block gas used ratios. These are calculated as the ratio of `gasUsed` and `gasLimit`.
* `reward` - An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.

```json
{
    "jsonrpc": "2.0",
    "result": {
        "baseFeePerGas": [
            "0x3da8e7618",
            "0x3e1ba3b1b",
            "0x3dfd72b90",
            "0x3d64eee76",
            "0x3d4da2da0",
            "0x3ccbcac6b"
        ],
        "gasUsedRatio": [
            0.5290747666666666,
            0.49240453333333334,
            0.4615576,
            0.49407083333333335,
            0.4669053
        ],
        "oldestBlock": "0xfab8ac",
        "reward": [
            [
                "0x59682f00",
                "0x59682f00"
            ],
            [
                "0x59682f00",
                "0x59682f00"
            ],
            [
                "0x3b9aca00",
                "0x59682f00"
            ],
            [
                "0x510b0870",
                "0x59682f00"
            ],
            [
                "0x3b9aca00",
                "0x59682f00"
            ]
        ]
    },
    "id": 0
}
```

{% tabs %}
{% tab title="mainnet" %}

```bash
curl https://mainnet.hedera.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_feeHistory","params":[{see above}],"id":1}'

```

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://testnet.hedera.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_feeHistory","params":[{see above}],"id":1}'

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.validationcloud.io/v1/hedera/json-rpc-relay-api/eth_feehistory.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
