# HTTP — `GET /v1/openOrders`

Fetch the user's currently open orders. Use this after a reconnect, a missed
WebSocket window, or an uncertain cancel. The endpoint is public and uses the
standard REST `{ status, data, server_time_ms }` envelope.

```http
GET /v1/openOrders?user=0x0000000000000000000000000000000000000001&cloid=0x00000000000000000000000000000002
```

Query params:

| Field   | Type     | Description                                      |
| ------- | -------- | ------------------------------------------------ |
| `user`  | `string` | Optional EVM account address. Defaults like WebSocket subscriptions. |
| `cloid` | `string` | Optional public client order id `c` to reconcile. |
| `limit` | `number` | Optional max rows. Defaults to `100`, max `500`. |

```jsonc
{
  "status": "ok",
  "data": {
    "user": "0x0000000000000000000000000000000000000001",
    "openOrders": [
      {
        "orderId": "8f20b2e6-8b7a-4a0b-bf3d-6fb70c622f76",
        "cloid": "0x00000000000000000000000000000002",
        "a": "BTC",
        "venue": "lighter",
        "b": "buy",
        "orderKind": "limit",
        "status": "open",
        "size": "1",
        "filledSize": "0",
        "remainingSize": "1",
        "p": "65000",
        "tif": "Alo",
        "createdAtMs": 1780000000000,
        "updatedAtMs": 1780000000100
      }
    ]
  },
  "server_time_ms": 1780000000100
}
```

If `cloid` is provided and `data.openOrders` is empty, Mosaiq has no currently
open placement for that public client order id. The order may be filled,
cancelled, failed, uncertain, or never accepted; use `orderUpdates` and
`userFills` for recent lifecycle and fill history.

Right after a place request is accepted, the order may be absent from
`openOrders` for a short window until Mosaiq applies the venue acknowledgement
into live RAM state. Use `orderUpdates`, `userFills`, or a later snapshot for
write-after-read confirmation.

## Reconciliation Flow

1. Send `POST /v1/exchange`.
2. Keep the returned `cloid` in memory.
3. Listen to `orderUpdates` and `userFills` on WebSocket.
4. On reconnect or uncertainty, call `/v1/openOrders?cloid=<cloid>`.

`openOrders` is only a live-order snapshot. It is not a full order-history
endpoint.
