# settlementRequests

**POST api/settlementRequests**

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

<pre class="language-json"><code class="lang-json">{
<strong>    "filter": "all"
</strong>}
</code></pre>

{% endtab %}

{% tab title="200 OK" %}

```json
[
    [                        // Incoming requests array
        [
            4,               // Counterparty id
            "BTC",           // Currency name
            0,               // Flags
            6700000000,      // Requested amount
            "your comment",  // Comment
            1634406457410,   // Expiration time
            "BTC",           // Transaction network
            123456,          // Request id
            1634405457410    // Creation time    
        ]
    ],
    [                        // Outgoing requests array 
        [
            4,
            "USD",
            0,
            0,
            "",
            0,                // Request won't be cancelled
            ""                // Network is not specified
            123456,           // Request id
            1634405457410     // Creation time
        ]
    ]
]
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name | Type   | Description                                                                                                                                                                                                                                                                                                |
| ---------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filter     | string | <p><em>Optional</em> <em>field</em> for master accounts only (FM Liquidity Match).<br>- absent or "all": returns settlement requests for all counterparties<br>- "subaccounts": returns  settlement requests for sub-accounts<br>- "external": returns settlement requests for external counterparties</p> |

**Response description**

| Field name            | Type                        | Description                                                                        |
| --------------------- | --------------------------- | ---------------------------------------------------------------------------------- |
|                       | Array\[2]                   | Settlement requests                                                                |
| 0                     | Array of SettlementRequests | Incoming settlement requests                                                       |
| 1                     | Array of SettlementRequests | Outgoing settlement requests                                                       |
| **SettlementRequest** |                             |                                                                                    |
|                       | Array\[7]                   |                                                                                    |
| 0                     | Efx::ClientId               | Counterparty id                                                                    |
| 1                     | string                      | Currency name                                                                      |
| 2                     | Efx::Flags                  | <p>0 - No flags</p><p>1 - Fee paid by recipient</p>                                |
| 3                     | Efx::Size                   | Requested amount. If zero, the full outstanding position is supposed to be settled |
| 4                     | string                      | Comment                                                                            |
| 5                     | Efx::Timestamp              | Request expiration time in milliseconds. If 0, request won't be expired.           |
| 6                     | string                      | Network or empty.                                                                  |
| 7                     | unsigned int64              | Request id                                                                         |
| 8                     | Efx::Timestamp              | Unix timestamp with milliseconds when the request was created                      |
