# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://faq.finerymarkets.com/api-reference/rest-api/risk-management/setclimit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
