# All orders (USER_DATA)

## API Description

Order history, including filled, cancelled and expired orders.

## HTTP Request

```http
GET /v1/allOrders
```

## Request Weight

5

## Request Parameters

| Name | Type | Mandatory | Description |
| - | - | - | - |
| `login` | LONG | YES | |
| `symbol` | STRING | NO | Exact, case-sensitive. |
| `orderId` | LONG | NO | Return orders with an id **greater than or equal to** this, within the time window. Order history is read from the trade server, which is always windowed — unlike `userTrades`, whose `fromId` overrides its window. |
| `startTime` | LONG | NO | Inclusive, Unix ms. |
| `endTime` | LONG | NO | Inclusive, Unix ms. |
| `limit` | INT | NO | Default `500`, maximum `1000`. |
| `recvWindow`, `timestamp`, `signature` | | | |

- With no window, the last **7 days** are returned. `endTime` alone returns the 7 days ending at
  `endTime`; `startTime` alone runs from `startTime` to now.
- `endTime - startTime` may not exceed **7 days** (`-1127`) — including the implicit "now" when only
  `startTime` is sent. `endTime` before `startTime` is `-1128`.
- Ordered oldest first, by setup time.
- `-5015` if the trade server's order history cannot be read.

## Response Example

**Response** — an array of the [`GET /v1/openOrders`](/trade/current-pending-orders.md) object, with terminal
statuses present:

```json
[
  {
    "login": 100123,
    "orderId": 44412350,
    "clientOrderId": "bot-002",
    "symbol": "XAUUSD",
    "side": "BUY",
    "type": "BUY_LIMIT",
    "status": "CANCELED",
    "volume": "0.10",
    "remainingVolume": "0.10",
    "price": "2325.00",
    "stopLimitPrice": "0",
    "sl": "2315.00",
    "tp": "0",
    "timeInForce": "GTC",
    "expiration": 0,
    "comment": "",
    "time": 1789012345690,
    "updateTime": 1789012400500
  }
]
```
