# HTTP — `GET /v1/openOrders`

The user's currently open orders. Public endpoint. It fails with HTTP `503`
and `temporarily_unavailable`, with the detail `risk_core_unavailable`, when
Mosaiq cannot read the current order state.

The list holds only the orders that the venue has proven on its book. `status`
is `open` for a resting order, including one whose cancel the venue has not
confirmed yet, and `partially_filled` once it has confirmed fills. A placement
that the venue has not proven resting is not an open order yet, even if a
cancel for it is in flight. Track it on `orderUpdates`.

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

A parameter that breaks its rule fails the request with HTTP `400` and `invalid_request`.
The table names the `detail` of each case.

| Param | Description |
| --- | --- |
| `user` | EVM address. Always set it: without it, the server reads a default account that is not yours. Malformed values fail with the detail `invalid_query`. |
| `cloid` | Optional public client order id to look up. Malformed values fail with the detail `invalid_cloid`. |
| `limit` | Rows per page, clamped to `1` to `500`, default `100`. Values that are not an integer in `0` to `65535` fail with the detail `invalid_query`. Sorted by creation time, then order id, ascending. |
| `cursor` | Optional opaque `nextCursor` from the previous page. Malformed values fail with the detail `invalid_cursor`. |

While `hasMore` is `true`, pass `nextCursor` as `cursor` in the next request.
Keep `user` and `cloid` unchanged. Each page starts strictly after the previous
page's last order, even if that order has since closed. Orders with the same
creation time are distinguished by order id.

```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
      }
    ],
    "nextCursor": "oo1_1780000000_0_8f20b2e6-8b7a-4a0b-bf3d-6fb70c622f76",
    "hasMore": false
  },
  "server_time_ms": 1780000000100
}
```

* `status` is `open` or `partially_filled`.
* `orderKind` is `limit` or `market`. A limit order carries `p` and `tif`
  (`Alo` or `Ioc`). A market order carries `slippage` instead.
* `avgFillPrice` appears once part of the order filled.
* `size` is the current total size, the filled part included, and
  `remainingSize` is `size - filledSize`. After a confirmed Hyperliquid modify,
  `remainingSize` is the modify's `s` until the new order fills, and `size` is
  `filledSize` plus `s`.
* `size` can shrink without a modify or a fill. A position decrease or a newer
  reduce-only order can trim a reduce-only order. A trim is final, even when the
  placement that caused it is refused before its venue send. On
  Lighter, another of your orders that crosses the order removes the crossed
  size from both orders (Lighter's self-trade prevention).

An empty `openOrders` for a `cloid` means that no open placement exists for
it. The order can be filled, cancelled, failed, uncertain, or never accepted.
Read its lifecycle on `orderUpdates` and its fills in
[`GET /v1/userFills`](/api/user-fills). A placement that Mosaiq just accepted
can be absent for a short time, until Mosaiq applies the venue
acknowledgement.

Each page reads the current live state. Pages do not share a frozen snapshot,
so an order can close or appear between requests. To refresh the full list,
start again without a cursor. A cursor does not replace `orderUpdates`. On an
empty page, `nextCursor` keeps the cursor that you sent, or is `null` if you
sent none. Stop the walk when `hasMore` is `false`.
