# settlementOrders

**POST api/settlementOrders**

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

```json
{
    "filter": "all",
    "filterTransactions": true,
    "counterpartyId": 5
}
```

{% endtab %}

{% tab title="200 OK" %}

<pre class="language-json"><code class="lang-json">[
  {
    "settlementOrderId": Efx::OrderId,
    "clientId": Efx::ClientId,
    "counterpartyId": Efx::ClientId,
    "createdAt": Efx::Timestamp,
    "comment": string,
    "flags": uint,
    "currency1": string,
    "size1": Efx::Size,
    "network1": string,  // optional
    "currency2": string, // optional
    "size2": Efx::Size,  // optional
    "network2": string   // optional
<strong>  },
</strong><strong>  ...
</strong>]
</code></pre>

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name         | Type          | Description                                                                                                                                                                                                                                                                                            |
| ------------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| filter             | string        | <p><em>Optional field</em> for master accounts only (FM Liquidity Match):</p><p>• absent or "all" – returns settlement orders for all counterparties</p><p>• "subaccounts" – returns settlement orders for sub-accounts</p><p>• "external" – returns settlement orders for external counterparties</p> |
| filterTransactions | bool          | *Optional*. False by default. If set to true, returns settlement orders created without an associated transaction                                                                                                                                                                                      |
| counterpartyId     | Efx::ClientId | *Optional.* Returns settlement orders associated with the specified counterparty                                                                                                                                                                                                                       |

**Response description**

| Field name          | Type                | Description                                                                                                             |
| ------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| 0                   | Array               | Array of settlement orders                                                                                              |
| **SettlementOrder** |                     |                                                                                                                         |
| settlementOrderId   | Efx::OrderId        | Settlement order id                                                                                                     |
| clientId            | Efx::ClientId       | Settlement order client id                                                                                              |
| counterpartyId      | Efx::CounterpartyId | Settlement order counterparty id                                                                                        |
| createdAt           | Efx::Timestamp      | Created at                                                                                                              |
| comment             | string              | Comment                                                                                                                 |
| flags               | unsigned int16      | <p>Settlement order flags<br>1 - controlled by transaction<br>2 - external<br>4 - overnights<br>8 - forced by admin</p> |
| currency1           | string              | First currency name                                                                                                     |
| size1               | Efx::Size           | The first size represents the amount transferred from the client to the counterparty                                    |
| network1            | string              | *Optional*. First network name.                                                                                         |
| currency2           | string              | *Optional.* Second currency name.                                                                                       |
| size2               | Efx::Size           | *Optional*. The second size represents the amount transferred from the counterparty to the client                       |
| network2            | string              | *Optional*. Second network name                                                                                         |
