# Optimal Priority Fees Endpoint

Returns optimized and recommended priority fee levels based on recent arbitrage transaction data.

**Note:** this returns micro-lamports. Which can be used directly in `SetComputeUnitPrice` instructions.

<mark style="color:green;">**`POST`**</mark> `https://api.getfomo.bot/priority-fees`

**Request**

```bash
curl -X POST https://api.getfomo.bot/priority-fees \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key-here"
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "result": {
    "priority_fee_levels": {
      "min": 0,
      "low": 2000,
      "medium": 120000,
      "high": 500000,
      "very_high": 1000000
    },
    "recommended": 120000
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request."
}
```

{% endtab %}

{% tab title="429" %}

```json
{
  "error": "Rate limit exceeded",
  "limit": 50,
  "unit": "requests/second"
}
```

{% endtab %}
{% endtabs %}
