> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base.org/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_feeHistory

> Returns historical base fees and priority fee percentiles for a range of blocks.

Returns historical gas information for a range of blocks, including base fees and the distribution of priority fees. Useful for building fee estimation strategies.

## Parameters

<ParamField body="blockCount" type="string | number" required>
  Number of blocks to return. Can be a decimal or hexadecimal integer. Maximum is typically 1024.
</ParamField>

<ParamField body="newestBlock" type="string" required>
  The highest block to include, as a block number in hex or a block tag (`"latest"`, `"pending"`, etc.).
</ParamField>

<ParamField body="rewardPercentiles" type="array" required>
  Array of percentile values (0–100) to sample from each block's priority fees. Example: `[25, 50, 75]` returns the 25th, 50th, and 75th percentile priority fees.
</ParamField>

## Returns

<ResponseField name="result" type="object">
  <Expandable title="Fee history fields">
    <ResponseField name="oldestBlock" type="string">The oldest block number in the result set (hex).</ResponseField>
    <ResponseField name="baseFeePerGas" type="array">Array of base fees per gas for each block, plus one extra entry for the next pending block. Length = `blockCount + 1`.</ResponseField>
    <ResponseField name="gasUsedRatio" type="array">Array of gas used / gas limit ratios for each block (0.0 to 1.0). Length = `blockCount`.</ResponseField>
    <ResponseField name="baseFeePerBlobGas" type="array">Array of base fees per blob gas for each block, plus one extra for the next pending block (EIP-4844). Always `"0x1"` on Base currently. Length = `blockCount + 1`.</ResponseField>
    <ResponseField name="blobGasUsedRatio" type="array">Array of blob gas used ratios for each block (0.0 to 1.0). Used to adjust the blob base fee (EIP-4844). Length = `blockCount`.</ResponseField>
    <ResponseField name="reward" type="array">2D array of priority fee percentiles per block, matching the requested percentile values.</ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_feeHistory",
    "params": ["0xa", "latest", [25, 50, 75]],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "baseFeePerBlobGas": [
        "0x1",
        "0x1",
        "0x1",
        "0x1",
        "0x3"
      ],
      "baseFeePerGas": [
        "0x4c4b40",
        "0x4c4b40",
        "0x4c4b40",
        "0x4c4b40",
        "0x4c4b40"
      ],
      "blobGasUsedRatio": [0, 0, 0, 0],
      "gasUsedRatio": [
        0.1180706525,
        0.1370935325,
        0.120803475,
        0.0968808
      ],
      "oldestBlock": "0x2c31b05",
      "reward": [
        ["0xf4240", "0x2191c0"],
        ["0xf4240", "0x186a00"],
        ["0x7a138", "0x4c4b40"],
        ["0xf4240", "0x4c4b40"]
      ]
    }
  }
  ```
</CodeGroup>
