# Closed Orders

## Get closed orders

<mark style="color:green;">`GET`</mark> `/closed-orders`

Get list of closed orders

**Headers**

| Name       | Value                 |
| ---------- | --------------------- |
| X-API-Key  | `API Key`             |
| X-API-Sign | `Generated Signature` |

**Query Params**

<table><thead><tr><th>Name</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>pair</code></td><td>string</td><td>false</td><td>Example NIZA/USDT</td></tr><tr><td><code>page-size</code></td><td>number</td><td>false</td><td> If not set, no pagination is applied</td></tr><tr><td><code>page</code></td><td>number</td><td>false</td><td>Page number if pagination is enabled</td></tr></tbody></table>

**Response**

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

````json
{
    "success": true,
    "message": "Request processed successfully",
    "data": [
        {
            "id": 414,
            "user_id": 16,
            "transaction_id": "ODRCKJ-JCDEO-E6WWJ7",
            "status": "closed",
            "open_time": "1711222874.0000",
            "close_time": "1711226536.3496",
            "expire_time": "0.0000",
            "reason": null,
            "pair": "NIZAEUR",
            "type": "buy",
            "order_type": "limit",
            "description": {
                "pair": "NIZAEUR",
                "type": "buy",
                "close": "",
                "order": "buy 10000.00000000 NIZAEUR @ limit",
                "price": "0.01450000",
                "leverage": "none",
                "orderType": "limit",
                "secondaryPrice": null
            },
            "volume": {
                "amount": "10000.00000000",
                "currency": "NIZA"
            },
            "volume_executed": {
                "amount": "10000.00000000",
                "currency": "NIZA"
            },
            "fee": {
                "amount": "10.00000000",
                "currency": "NIZA"
            },
            "price": {
                "amount": "0.01450000",
                "currency": "EUR"
            },
            "secondary_price": null,
            "limit_price": null,
            "cost": {
                "amount": "145.00000000",
                "currency": "EUR"
            },
            "asset_pair": {
                "id": 679,
                "name": "NIZAEUR",
                "display_name": "NIZA/EUR",
                "base_name": "NIZA",
                "quote_name": "EUR"
            },
            "trigger_conditions": "--",
            "trades": [
                {
                    "id": 649,
                    "timestamp": "2024-03-23 20:41:34",
                    "type": "buy",
                    "volume": {
                        "amount": "9895.89972975",
                        "currency": "NIZA"
                    },
                    "price": {
                        "amount": "0.01450000",
                        "currency": "NIZA/EUR"
                    },
                    "cost": {
                        "amount": "143.49054608",
                        "currency": "EUR"
                    },
                    "transaction_id": "TZMV3L-FLZLZ-UPN23X"
                },
                {
                    "id": 651,
                    "timestamp": "2024-03-23 21:40:15",
                    "type": "buy",
                    "volume": {
                        "amount": "50.00000000",
                        "currency": "NIZA"
                    },
                    "price": {
                        "amount": "0.01450000",
                        "currency": "NIZA/EUR"
                    },
                    "cost": {
                        "amount": "0.72500000",
                        "currency": "EUR"
                    },
                    "transaction_id": "TMWHLR-WNUTL-NZIL3B"
                },
                {
                    "id": 653,
                    "timestamp": "2024-03-23 21:42:16",
                    "type": "buy",
                    "volume": {
                        "amount": "54.10027025",
                        "currency": "NIZA"
                    },
                    "price": {
                        "amount": "0.01450000",
                        "currency": "NIZA/EUR"
                    },
                    "cost": {
                        "amount": "0.78445392",
                        "currency": "EUR"
                    },
                    "transaction_id": "TTXR7L-IC8HD-BFND2K"
                }
            ]
        },
        {
            "id": 409,
            "user_id": 16,
            "transaction_id": "OTST3F-8ER6U-CQFXYC",
            "status": "closed",
            "open_time": "1711140640.0000",
            "close_time": "1711222894.3192",
            "expire_time": "0.0000",
            "reason": null,
            "pair": "NIZAEUR",
            "type": "buy",
            "order_type": "limit",
            "description": {
                "pair": "NIZAEUR",
                "type": "buy",
                "close": "",
                "order": "buy 202.73972603 NIZAEUR @ limit",
                "price": "0.01460000",
                "leverage": "none",
                "orderType": "limit",
                "secondaryPrice": null
            },
            "volume": {
                "amount": "202.73972603",
                "currency": "NIZA"
            },
            "volume_executed": {
                "amount": "202.73972603",
                "currency": "NIZA"
            },
            "fee": {
                "amount": "0.20273973",
                "currency": "NIZA"
            },
            "price": {
                "amount": "0.01460000",
                "currency": "EUR"
            },
            "secondary_price": null,
            "limit_price": null,
            "cost": {
                "amount": "2.96000000",
                "currency": "EUR"
            },
            "asset_pair": {
                "id": 679,
                "name": "NIZAEUR",
                "display_name": "NIZA/EUR",
                "base_name": "NIZA",
                "quote_name": "EUR"
            },
            "trigger_conditions": "--",
            "trades": [
                {
                    "id": 645,
                    "timestamp": "2024-03-23 20:37:50",
                    "type": "buy",
                    "volume": {
                        "amount": "98.63945578",
                        "currency": "NIZA"
                    },
                    "price": {
                        "amount": "0.01460000",
                        "currency": "NIZA/EUR"
                    },
                    "cost": {
                        "amount": "1.44013605",
                        "currency": "EUR"
                    },
                    "transaction_id": "T22LYE-CUNXC-UFIBKE"
                },
                {
                    "id": 647,
                    "timestamp": "2024-03-23 20:41:34",
                    "type": "buy",
                    "volume": {
                        "amount": "104.10027025",
                        "currency": "NIZA"
                    },
                    "price": {
                        "amount": "0.01460000",
                        "currency": "NIZA/EUR"
                    },
                    "cost": {
                        "amount": "1.51986395",
                        "currency": "EUR"
                    },
                    "transaction_id": "T8YZRI-NV6MO-VG3JKZ"
                }
            ]
        }
    ],
    "code": 200,
    "meta": {
        "current_page": 1,
        "from": 1,
        "to": 2,
        "path": "https://app.niza.io/trade/v1/closed-orders",
        "per_page": 2,
        "total": 72,
        "last_page": 36
    }
}
```
````

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% 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://docs.niza.io/authenticated-endpoints/orders/closed-orders.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.
