> For the complete documentation index, see [llms.txt](https://faq.finerymarkets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faq.finerymarkets.com/api-reference/rest-api/risk-management/setclimit.md).

# setCLimit

**POST api/setCLimit**

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

```json
{
    "counterpartyId": 4,
    "currency": "EUR",
    "grossLimit": 15000000000000,
    "maintenanceMargin": 1000, // For makers and masters only
    "restrictedTrading": 1500, // For makers and masters only
    "initialMargin": 2000
}
```

{% endtab %}

{% tab title="200 OK" %}

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

{% endtab %}

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

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name        | Type          | Description                                                                                                                                                                                                                        |
| ----------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| counterpartyId    | Efx::ClientId | Counterparty Id                                                                                                                                                                                                                    |
| currency          | string        | Currency name                                                                                                                                                                                                                      |
| grossLimit        | Efx::Size     | Gross limit size                                                                                                                                                                                                                   |
| maintenaceMargin  | Efx::Percent  | <p><em>Optional. For makers and masters only!</em><br>Maintenance margin level.<br>In % multiplied by 1e4.<br>From 0 to 1000000, that is 0% to 100% of gross limit.</p>                                                            |
| restrictedTrading | Efx::Percent  | <p><em>Optional. For makers and masters only!</em><br>Restricted trading level.<br>In % multiplied by 1e4.<br>From 0 to 1000000, that is 0% to 100% of gross limit.<br>Should be greater or equal to the maintenance margin.</p>   |
| initialMargin     | Efx::Percent  | <p><em>Optional. For makers and masters only!</em><br>Initial margin level.<br>In % multiplied by 1e4.<br>From 0 to 1000000, that is 0% to 100% of gross limit.<br>Should be greater or equal to the restricted trading level.</p> |

{% hint style="info" %}
Only one limit could be set against the counterparty.

Setting the new limit will modify the existing one.
{% endhint %}
