> ## 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.

# klay_feeHistory

> Returns historical base fee and priority fee percentile data for recent Klaytn blocks.

### Parameters

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

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: klay\_feeHistory)

JSON-RPC method name.

**params** `object` *required*

Parameters: \[blockCount, newestBlock, rewardPercentiles].

Positional parameters for `klay_feeHistory`:

<ul>
  <li>`params[0]`: Hex-encoded number of blocks in the request range (max 1024).</li>
  <li>`params[1]`: Block number where this transaction was included. Null when pending.</li>
  <li>`params[2]`: Priority fee percentiles to return (0-100).</li>
</ul>

### Returns

**result** `object`

Fee history for the requested range.

**properties**

**oldestBlock** `string`

Block number of the first block in the range.

**baseFeePerGas** `array`

Array of base fees per gas for each block.

**items**

**items\[]** `string`

**gasUsedRatio** `array`

Gas used ratios for each block.

**items**

**items\[]** `number`

**reward** `array`

Priority fee rewards per percentile.

**items**

**items\[]** `array`

**items**

**items\[]** `string`

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

```json Success theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {}
}
```


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