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

# eth_feeHistory

> Returns historical gas information

## Parameters

<ParamField body="blockCount" type="string" required>
  Number of blocks to return (hex, max 1024)
</ParamField>

<ParamField body="newestBlock" type="string" required>
  Newest block (hex), or `latest`, `pending`
</ParamField>

<ParamField body="rewardPercentiles" type="array">
  Array of percentiles for priority fee sampling
</ParamField>

## Returns

<ParamField body="feeHistory" type="object">
  Fee history object

  <Expandable title="properties">
    <ParamField body="oldestBlock" type="string">
      Oldest block in range (hex)
    </ParamField>

    <ParamField body="baseFeePerGas" type="array">
      Array of base fees per gas
    </ParamField>

    <ParamField body="gasUsedRatio" type="array">
      Array of gas used ratios
    </ParamField>

    <ParamField body="reward" type="array">
      Array of priority fee percentiles
    </ParamField>
  </Expandable>
</ParamField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://edge.goldsky.com/standard/evm/1?secret=YOUR_SECRET" \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": [4, "latest", [25, 75]], "id": 1}'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://edge.goldsky.com/standard/evm/1?secret=YOUR_SECRET', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
    "jsonrpc": "2.0",
    "method": "eth_feeHistory",
    "params": [
      4,
      "latest",
      [
        25,
        75
      ]
    ],
    "id": 1
  })
  });
  const { result } = await response.json();
  console.log(result);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://edge.goldsky.com/standard/evm/1?secret=YOUR_SECRET',
      json={
    "jsonrpc": "2.0",
    "method": "eth_feeHistory",
    "params": [
      4,
      "latest",
      [
        25,
        75
      ]
    ],
    "id": 1
  }
  )
  print(response.json()['result'])
  ```
</CodeGroup>
