# positions

**POST api/positions**

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

```json
{
    "filter": "all"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    5,
    [
        [ 
            "BTC",        // Posititon Currency
            -10000000,    // Value
            2,            // Counterparty id
            0,            // Max reachable position, if the settlement order is committed
            -10000000     // Min reachable position
        ],
        [
            "USD",
            100000000000,
            2,
            100000000000,
            0,
        ]
    ],
    [
        [
            "BTC-USD",     // Order instrument
            0,             // Order type
            0,             // Side
            0,             // Cancel reason
            1234,          // Order id
            0,             // Client order id 
            999900000000,  // Price
            10000000,      // Size or volume
            8000000,       // Remaining size or volume
            1558051200000, // Created at
            0              // created by size or volume
        ]
    ],
    [
        [
            1229,          // Settlement order id
            "BTC",         // Currency 1
            "USD",         // Currency 2
            10000000,      // Size 1
            100000000000,  // Size 2
            1558050900000, // Created at
            2,             // Counterparty id
            "BTC",         // Network name 1
            ""             // Network name 2 (not specified)    
        ]
    ]
]
```

{% 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 positions for all counterparties<br>- "subaccounts": returns  positions for the sub-accounts<br>- "external": returns positions for external counterparties</p> |

#### Response description

| Fiels name          | Type                      | Description                                                                                                                                                                                 |
| ------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                     | Array\[4]                 | Array or 4 elements                                                                                                                                                                         |
| 0                   | Efx::DealId               | Next Deal or Settlement Id                                                                                                                                                                  |
| 1                   | Array of Positions        | Asset Positions                                                                                                                                                                             |
| 2                   | Array of Orders           | Active Orders *(for makers only)*                                                                                                                                                           |
| 3                   | Array of SettlementOrders | Active Settlement Orders                                                                                                                                                                    |
| **Position**        | Array\[3]                 |                                                                                                                                                                                             |
| 0                   | string                    | Currency name                                                                                                                                                                               |
| 1                   | Efx::Size                 | Value                                                                                                                                                                                       |
| 2                   | Efx::ClientId             | Counterparty Id                                                                                                                                                                             |
| 3                   | Efx::Size                 | [Max reachable position](https://faq.finerymarkets.com/api-reference/rest-api/deals-and-positions/pages/ZUQoVImm7uH6Fljm2jUL#id-5.-what-is-max-min-reachable-position)                      |
| 4                   | Efx::Size                 | [Min reachable position](https://faq.finerymarkets.com/api-reference/rest-api/deals-and-positions/pages/ZUQoVImm7uH6Fljm2jUL#id-5.-what-is-max-min-reachable-position)                      |
| **Order**           | Array\[11]                |                                                                                                                                                                                             |
| 0                   | string                    | Instrument name                                                                                                                                                                             |
| 1                   | unsigned int16            | <p>Order Type</p><p>0 - limit</p><p>1 - post only</p><p>2 - limit IOC</p><p>3 - limit FOK</p><p>4 - market IOC</p><p>5 - market FOK<br>6 - manual trade<br>7 - pending limit<br>9 - RFQ</p> |
| 2                   | Efx::Side                 | <p>Side</p><p>0 - bid</p><p>1 - ask</p>                                                                                                                                                     |
| 3                   | unsigned int16            | <p>Cancel reason</p><p>0 - in place or filled</p><p>1 - by client</p><p>2 - as non-book order</p><p>3 - by self-trade prevention</p><p>4 - cancel-on-disconnect</p>                         |
| 4                   | Efx::OrderId              | Order Id                                                                                                                                                                                    |
| 5                   | Efx::ClientOrderId        | Client Order Id                                                                                                                                                                             |
| 6                   | Efx::Price                | Order price                                                                                                                                                                                 |
| 7                   | Efx::Size                 | Order Initial Size Or Volume (Depending on Order was initially created by size or volume)                                                                                                   |
| 8                   | Efx::Size                 | Remaining Order Size Or Volume (Depending on Order was initially created by size or volume)                                                                                                 |
| 9                   | Efx::Timestamp            | Created At                                                                                                                                                                                  |
| 10                  | unsigned int16            | <p>If order was created by size or by volume</p><p>0 - by size</p><p>1 - by volume</p>                                                                                                      |
| **SettlementOrder** | Array\[9]                 |                                                                                                                                                                                             |
| 0                   | Efx::OrderId              | Settlement order id                                                                                                                                                                         |
| 1                   | string                    | Currency 1                                                                                                                                                                                  |
| 2                   | string                    | Currency 2                                                                                                                                                                                  |
| 3                   | Efx::Size                 | Size 1                                                                                                                                                                                      |
| 4                   | Efx::Size                 | Size 2                                                                                                                                                                                      |
| 5                   | Efx::Timestamp            | Created At                                                                                                                                                                                  |
| 6                   | Efx::ClientId             | Counterparty id                                                                                                                                                                             |
| 7                   | string                    | Newtork 1 or empty                                                                                                                                                                          |
| 8                   | string                    | Network 2 or empty                                                                                                                                                                          |


---

# 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/deals-and-positions/positions.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.
