openOrders
Endpoint
WebSocket /ws
Selector: subscription.type: "openOrders"
Purpose
Streams the selected customer's open-order list, with an initial list and updates when that list changes.
Authorization
Owner or approved reader for subscription.user. The SDK signs requests. Current permissions are checked before delivery; expiry or revocation stops access.
Request fields
| Field | Type | Required | Meaning |
|---|---|---|---|
method | String | Yes | "subscribe". |
auth | Object | Yes | Request proof with timestamp, nonce and signature; see authorization. |
subscription | Object | Yes | Subscription definition. |
subscription.type | String | Yes | "openOrders". |
subscription.user | Address | Yes | Customer account authorized by the request signer. |
subscription.dex | String | No | Omit or use "" for the default DEX. Other values are unsupported. |
Request example
Test fixture. Generate a fresh proof before use. Fixture inputs.
{
"method": "subscribe",
"subscription": {
"type": "openOrders",
"user": "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf"
},
"auth": {
"timestamp": 1796250000000,
"nonce": "0x0303030303030303030303030303030303030303030303030303030303030303",
"signature": "0xca60c8cb82aa8b58b8283a3a2c324a0cba31c4162b0c942523f7c53f2f54ce455b072a9f2bdca857ae08d5b27bf01f746d011a30bdce4b8b5ea72dad34b55f4b1c"
}
}Response fields
First receive a subscribe acknowledgement, then data:
| Field | Meaning |
|---|---|
channel | "openOrders". |
data | Customer open-order message. |
data.dex | "" for the default DEX. |
data.user | Selected customer account address. |
data.orders | Current open-order array; empty when there are no open orders in this customer view. |
Each nonempty data.orders entry contains:
| Field | Meaning |
|---|---|
coin | Configured market name. |
limitPx | Limit price as a decimal string. |
oid | Order ID in the customer order view. |
side | "B" for buy or "A" for sell. |
sz | Remaining size as a decimal string. |
timestamp | Order time in Unix milliseconds. |
cloid | Client order ID, or null if absent. |
Response example
{
"channel": "openOrders",
"data": {
"dex": "",
"user": "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf",
"orders": []
}
}Constraints
- Each update contains the current order array rather than a list of field-level patches. Unchanged arrays are not resent.
- A subscription update is an observation of order state, not permission to infer an unobserved fill.
- Duplicate requests acknowledge the existing subscription without another snapshot.
unsubscribe stops this subscription. WebSocket overview covers connection limits and reconnect behavior.