# GET Orders

## Get list of all orders in one account

<mark style="color:green;">`GET`</mark> `/v1/api/accounts/{account}/orders`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Path Parameters**

<table><thead><tr><th width="156">Name</th><th width="119">Type</th><th width="128">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>account</code></td><td>string</td><td><mark style="color:red;">Required</mark></td><td>Name of account in NT8</td></tr></tbody></table>

**Query Parameters**

<table><thead><tr><th width="156">Name</th><th width="119">Type</th><th width="128">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>activeOnly</code></td><td>boolean</td><td>Optional</td><td>Include all active orders (default true)</td></tr></tbody></table>

**Code Examples**

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

```python
import requests

token = 'my-secret-token'

url = "https://app.crosstrade.io/v1/api/accounts/Sim101/orders"
headers = {
    "Authorization": f"Bearer {token}",
    "Content-Type": "application/json"
}
params = {
    "activeOnly": False
}

try:
    response = requests.get(url, headers=headers, params=params)
    print(f"Response Code: {response.status_code}, Response Text: {response.text}")
except Exception as e:
    print(f"An error occurred: {e}")
```

{% endtab %}
{% endtabs %}

***

**Response**

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

```json
{
    "orders": [
        {
            "id": "3cac8a5e85a041ababd9e33a4cecdbc0",
            "type": "NinjaTrader.Cbi.Order",
            "time": "2025-09-26T11:37:08.4195857",
            "epoch": 1727375828419,
            "name": "",
            "ocoId": "",
            "onBehalfOf": "",
            "clientId": -1,
            "account": "Sim101",
            "instrument": "ES 12-25",
            "instrumentType": "Future",
            "orderType": "Limit",
            "orderState": "Working",
            "orderAction": "Sell",
            "quantity": 1,
            "quantityChanged": 1,
            "limitPrice": 5805.0,
            "limitPriceChanged": 5805.0,
            "stopPrice": 0.0,
            "stopPriceChanged": 0.0,
            "averageFillPrice": 0.0,
            "filled": 0,
            "timeInForce": "Day",
            "gtd": "2099-12-01T00:00:00.0000000",
            "fromEntrySignal": null,
            "hasOverfill": false,
            "isBacktestOrder": false,
            "isLimit": true,
            "isLiveUntilCancelled": false,
            "isLong": false,
            "isMarket": false,
            "isMarketIfTouched": false,
            "isShort": true,
            "isSimulatedStop": false,
            "isStopLimit": false,
            "isStopMarket": false,
            "isTrackingConfigured": false,
            "isTrackingEnabled": false,
            "userData": "<NinjaTrader />",
            "ownerStrategy": {
                "id": null,
                "name": null,
                "displayName": null
            }
        }
    ],
    "success": true
}
```

{% endtab %}

{% tab title="400" %}

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

{% endtab %}
{% endtabs %}

#### WebSocket API

This request can also be made over the WebSocket API. The `account` path parameter and query parameters are passed inside `args`.

```json
{
  "action": "rpc",
  "id": "my-request-id",
  "api": "ListOrders",
  "args": {
    "account": "Sim101",
    "activeOnly": false
  }
}
```
