# settings/setOvernightRates

Setting overnight rates method is applicable for makers/masters only.\
It is possible to set a specific overnight rate.

After the change is done, every affected counterparty/sub-account will be notified about a change by email within 10 minutes.

**POST api/settings/set\_overnight\_rates**

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

```json
// Set overnight rates
{ 
 "counterpartyId": 2, // counterpartyId or counterpartyGroup
 "currencyGroup": "fiat", // currencyId or currencyGroup
 "negativeRate": 10, // negative rate value
 "positiveRate": 0 // positive rate value
 }

// Reset overnight rates
{
 "counterpartyId": 2, // counterpartyId or counterpartyGroup
 "currencyGroup": "fiat" // currencyId or currencyGroup
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{"error": 0}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 9
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name        | Type           | Description                                                                                                                                                                                            |
| ----------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| counterpartyId    | ClientId       | *Optional.* Counterparty ID if setting the rate for a specific counterparty.                                                                                                                           |
| counterpartyGroup | string         | *Optional.* Counterparty group if setting the rate for a group of  counterparties. Values: 'all', 'externalTakers', 'externalMakers', 'externals', 'subaccountTaker', 'subaccountMaker', 'subaccounts' |
| currency          | string         | Currency name                                                                                                                                                                                          |
| currencyGroup     | string         | *Optional.* CurrencyGroup  if setting the rate for a group of currencies. Values: 'all', 'fiat',  'crypto',  'stablecoin'                                                                              |
| negativeRate      | unsigned int32 | <p><em>Optional.</em> Negative rate,<br>min vaue=100=1 bps = 0.01%<br>If both negative and positive are in a request, then rates will be set. If both rates are missing,  rates will be deleted.</p>   |
| positiveRate      | unsigned int32 | <p><em>Optional.</em> Positive rate,<br>min vaue=100=1 bps = 0.01%<br>If both negative and positive are in a request, then rates will be set. If both rates are missing,  rates will be deleted.</p>   |
