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

# eth_feeHistory

> Returns historical gas fee data over a range of blocks, including base fees, blob gas metrics (EIP-4844), and priority fee percentiles.

### Parameters

**chainId** `string` *required* (default: 10)

Unique identifier for a blockchain network.

**id** `number` *required* (default: 1)

Request identifier used to match responses.

**jsonrpc** `string` *required* (default: 2.0)

JSON-RPC version.

**method** `string` *required* (default: eth\_feeHistory)

JSON-RPC method name.

**params** `object` *required*

Parameters: \[blockCount, newestBlock, rewardPercentiles]

Positional parameters for `eth_feeHistory`:

<ul>
  <li>`params[0]`: Hex-encoded number of blocks in the requested range (max: 0x400 / 1024 blocks).</li>
  <li>`params[1]`: Newest block identifier: a hex block number or one of: "latest", "earliest", "pending".</li>
  <li>`params[2]`: Optional array of integers representing percentiles (ascending).</li>
</ul>

### Returns

**result** `object`

Historical gas fee statistics over the requested range of blocks.

**properties**

**oldestBlock** `string`

The lowest block number in the returned range (hex).

**baseFeePerGas** `array`

Base fee per gas for each block in the range, plus one for the next block.

**items**

**items\[]** `string`

**baseFeePerBlobGas** `array`

Base fee per blob gas (EIP-4844). Zeroes for pre-4844 blocks.

**items**

**items\[]** `string`

**gasUsedRatio** `array`

Ratio of gas used to gas limit for each block.

**items**

**items\[]** `number`

**blobGasUsedRatio** `array`

Ratio of blob gas used to max blob gas per block (EIP-4844).

**items**

**items\[]** `number`

**reward** `array`

Effective priority fees per gas for specified percentiles across each block.

**items**

**items\[]** `array`

**items**

**items\[]** `string`

```bash Curl theme={null}
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=10 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_feeHistory",
    "params": [
      "0x5",
      "latest",
      [
        20,
        30
      ]
    ]
  }'
```

```json Success theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "oldestBlock": "0x14535f8",
    "baseFeePerGas": [
      "0x279c70a9b",
      "0x2a63ee068",
      "0x2a01a5449",
      "0x299fc09af",
      "..."
    ],
    "baseFeePerBlobGas": [
      "0xe3f5193b",
      "0xf6942037",
      "0xdb2e5553",
      "0xc2d3d9e8",
      "..."
    ],
    "gasUsedRatio": [
      0.7806543666666667,
      0.46377263333333335,
      0.46358696666666666,
      0.503863,
      "..."
    ],
    "blobGasUsedRatio": [
      0.8333333333333334,
      0,
      0,
      1,
      "..."
    ],
    "reward": [
      [
        "0x5f5e100",
        "0x34142698"
      ],
      [
        "0x5f5e100",
        "0x1f619e76"
      ],
      [
        "0x5f5e100",
        "0x39d10680"
      ],
      [
        "0x6824280",
        "0x214c9a15"
      ],
      "..."
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.