# dealHistory (authorized)

**POST api/authorized/dealHistory**

{% hint style="info" %}
Method works similar to the `api/dealHistory` with `clientId` additional field
{% endhint %}

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

```json
{
    "clientId": 1,
    "instrument": "BTC-USD",
    "filter": "all"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    [
        "BTC-USD",       // Instrument name
        0,               // Order type
        0,               // Side
        0,               // Cancel reason
        1234,            // Order id
        0,               // Client order id
        9900000000,      // Order price
        10000000,        // Order initial size or volume
        9998000,         // Remaining order size or volume
        1558051200000,   // Order created at
        1558052600000,   // Deal moment
        12,              // Deal id
        1,               // Deal aggressor side
        9900000000,      // Deal price
        2000,            // Deal size
        19800000000000,  // Deal volume
        100000,          // Deal delta
        14,              // Counterparty id
        0,               // Order created by size or volume
        10,              // Taker order owner id
        0,               // Linked deal id
        0,               // Deal type
        15,              // Maker order owner id
        0                // Liquidity source
    ]
]
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}


---

# 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/dealhistory-authorized.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.
