# List orders

URL: https://docs.fxapis.com/api-reference/history/list-orders

> List orders. Every order this workspace has placed, newest first, across all accounts unless accountId narrows it.

`GET https://api.fxapis.com/v1/orders`

Every order this workspace has placed, newest first, across all accounts unless `accountId` narrows it. Filter by `state` to find what needs attention — `state=unknown` is the set whose result we are still confirming with the broker.

Paginated by cursor rather than offset: an offset shifts as new orders arrive, so page two would silently skip rows.

Authentication: `Authorization: Bearer <API key>`.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `accountId` | query | string (uuid) | no | Narrow to one account. |
| `state` | query | "accepted" \| "validating" \| "sending" \| "working" \| "completed" \| "filled" \| "partially_filled" \| "rejected" \| "failed" \| "unknown" \| "cancelled" \| "expired" | no | `unknown` is the set whose result we are still confirming with the broker. |
| `symbol` | query | string | no |  |
| `since` | query | string (date-time) | no |  |
| `until` | query | string (date-time) | no |  |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no | The `nextCursor` from the previous page. |

#### Responses

- `200`
- `400`
- `401`

Failures return `{ "error": { "code", "message" } }`; every code is listed at https://docs.fxapis.com/errors.

#### 200 response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] | no |  |
| `data[].id` | string (uuid) | no |  |
| `data[].accountId` | string (uuid) | no |  |
| `data[].clientOrderId` | null \| string | no | Your own reference, echoed back. |
| `data[].symbol` | string | no | The broker symbol traded. |
| `data[].instrument` | null \| string | no | The instrument the order named, when it named one; `symbol` is what it was traded as. Example: `"XAUUSD"` |
| `data[].side` | "buy" \| "sell" | no |  |
| `data[].type` | "market" \| "limit" \| "stop" \| "stop_limit" | no |  |
| `data[].intent` | "open" \| "close" \| "modify" \| "cancel" | no | What this order was for. A close is an order, with the same record and the same failed/unknown distinction as an open — `modify` covers moving a stop, which changes what the account risks. |
| `data[].brokerPositionId` | null \| string | no | The broker's position ticket. On a close or a stop change, the position it acted on. On an opening order, the position it opened — pass it to `POST /v1/accounts/{id}/positions/{positionId}/close`. Set when the order fills if the terminal reports it; for an order filled by an older terminal, or a pending order that fills later, once the broker's deal history for it has been read. Null until known. |
| `data[].volume` | null \| string | no | Requested volume, in lots. |
| `data[].stopLoss` | null \| string | no | Absolute price, not a distance. |
| `data[].takeProfit` | null \| string | no | Absolute price, not a distance. |
| `data[].state` | "accepted" \| "validating" \| "sending" \| "working" \| "completed" \| "filled" \| "partially_filled" \| "rejected" \| "failed" \| "unknown" \| "cancelled" \| "expired" | no |  |
| `data[].stateDetail` | null \| string | no |  |
| `data[].needsReconciliation` | boolean | no | True while we are confirming the result with the broker. Never resend such an order; poll it. |
| `data[].retcode` | null \| integer | no | The broker's own MT5 return code, unmodified. 10009 is a completed request. |
| `data[].retcodeText` | null \| string | no |  |
| `data[].brokerOrderId` | null \| string | no | The broker's ticket. What their statement shows. |
| `data[].brokerDealId` | null \| string | no |  |
| `data[].filledVolume` | null \| string | no | What actually filled, which can be less than requested. |
| `data[].filledPrice` | null \| string | no | What it actually filled at, which is rarely the requested price. |
| `data[].sentAt` | null \| string (date-time) | no |  |
| `data[].settledAt` | null \| string (date-time) | no | When an answer arrived. |
| `data[].reconciledAt` | null \| string (date-time) | no | Set when a result was confirmed with the broker after the fact. |
| `data[].createdAt` | string (date-time) | no |  |
| `page` | object | no |  |
| `page.hasMore` | boolean | no |  |
| `page.nextCursor` | null \| string | no | Pass as `cursor` to continue. |