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

# Estimate gas fees

> How to query Polygon Gas Station for gas price recommendations, and how to interpret the response.

Polygon Gas Station provides gas price recommendations for PoS mainnet, Amoy testnet, and zkEVM networks. It queries the RPC for `eth_feeHistory` and computes the 10th, 25th, and 50th percentiles of priority fees across the last 15 blocks. These become the `safeLow`, `standard`, and `fast` predictions.

<Note>
  On Polygon PoS mainnet, a minimum priority fee of 25 gWei is required.
</Note>

## Query gas price recommendations

Send a `GET` request to the endpoint for your target network.

### Testnet endpoints

* Amoy testnet: `https://gasstation.polygon.technology/amoy`
* zkEVM Cardona: `https://gasstation.polygon.technology/zkevm/cardona`

<CodeGroup>
  ```bash cURL theme={null}
  curl https://gasstation.polygon.technology/amoy
  ```

  ```javascript JavaScript theme={null}
  fetch('https://gasstation.polygon.technology/amoy')
    .then(response => response.json())
    .then(json => console.log(json))
  ```

  ```python Python theme={null}
  import requests
  requests.get('https://gasstation.polygon.technology/amoy').json()
  ```
</CodeGroup>

### Mainnet endpoints

* PoS mainnet: `https://gasstation.polygon.technology/v2`
* zkEVM mainnet: `https://gasstation.polygon.technology/zkevm`

<CodeGroup>
  ```bash cURL theme={null}
  curl https://gasstation.polygon.technology/v2
  ```

  ```javascript JavaScript theme={null}
  fetch('https://gasstation.polygon.technology/v2')
    .then(response => response.json())
    .then(json => console.log(json))
  ```

  ```python Python theme={null}
  import requests
  requests.get('https://gasstation.polygon.technology/v2').json()
  ```
</CodeGroup>

## Response format

Example response:

```json theme={null}
{
  "safeLow": {
    "maxPriorityFee":30.7611840636,
    "maxFee":30.7611840796
    },
  "standard": {
    "maxPriorityFee":32.146027800733336,
    "maxFee":32.14602781673334
    },
  "fast": {
    "maxPriorityFee":33.284344224133335,
    "maxFee":33.284344240133336
    },
  "estimatedBaseFee":1.6e-8,
  "blockTime":6,
  "blockNumber":24962816
}
```

| Field              | Description                                                        |
| ------------------ | ------------------------------------------------------------------ |
| `safeLow`          | Conservative fee estimate (GWei). Use for non-urgent transactions. |
| `standard`         | Moderate fee estimate (GWei). Suitable for most transactions.      |
| `fast`             | Higher fee estimate (GWei). Use when faster inclusion is needed.   |
| `estimatedBaseFee` | Current base fee in GWei.                                          |
| `blockNumber`      | The latest block mined when the recommendation was made.           |
| `blockTime`        | Average block time in seconds for the network.                     |
