# eth\_feeHistory

1. **Parameters**

* <mark style="color:blue;">blockCount</mark> string/integer \*REQUIRED

  The number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. It will return less than the requested range if not all blocks are available

* <mark style="color:blue;">newestBlock</mark> string\*REQUIRED

  The highest number block of the requested range in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain

* <mark style="color:blue;">rewardPercentiles</mark> integer\*REQUIRED

  A list of percentile values with a monotonic increase in value. The transactions will be ranked by effective tip per gas for each block in the requested range, and the corresponding effective tip for the percentile will be calculated while taking gas consumption into consideration.

```json
curl https://Krypc-End Point URL/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1,"jsonrpc":"2.0"}'

```

2. **Returns**
   1. Results
      1. <mark style="color:blue;">oldestBlock</mark>      &#x20;

         The lowest number block of the returned range encoded in hexadecimal format
      2. <mark style="color:blue;">baseFeePerGas</mark>

         An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks
      3. <mark style="color:blue;">gasUsedRatio</mark>

         An array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit
      4. <mark style="color:blue;">reward</mark>

         An array of effective priority fees per gas data points from a single block. All zeroes are returned if the block is empty


---

# Agent Instructions: 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:

```
GET https://docs.krypcore.com/dev-docs/api-reference/infrastructure-apis/ethereum-json-rpc-apis/eth_feehistory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
