# openOrders

## Subscribe to openOrders

> Subscription to open order events for a specific user.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid Subscription - openOrders","version":"1.0.0"},"tags":[{"name":"openOrders"}],"servers":[{"url":"wss://api.hyperliquid.xyz/ws","description":"Mainnet WebSocket"},{"url":"wss://api.hyperliquid-testnet.xyz/ws","description":"Testnet WebSocket"}],"paths":{"/":{"post":{"tags":["openOrders"],"summary":"Subscribe to openOrders","description":"Subscription to open order events for a specific user.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of subscription.","enum":["openOrders"]},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."},"dex":{"type":"string","description":"DEX name (empty string for main dex)."}},"required":["type","user"],"description":"Subscription to open order events for a specific user."}}},"required":true},"responses":{"200":{"description":"Event of open orders for a specific user.","content":{"application/json":{"schema":{"type":"object","properties":{"dex":{"type":"string","description":"DEX name (empty string for main dex)."},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."},"orders":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"side":{"enum":["B","A"],"description":"Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell)."},"limitPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Limit price."},"sz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Size."},"oid":{"type":"integer","minimum":0,"description":"Order ID."},"timestamp":{"type":"integer","minimum":0,"description":"Timestamp when the order was placed (in ms since epoch)."},"origSz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Original size at order placement."},"triggerCondition":{"type":"string","description":"Condition for triggering the order."},"isTrigger":{"type":"boolean","description":"Indicates if the order is a trigger order."},"triggerPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Trigger price."},"children":{"type":"array","items":{},"description":"Child orders associated with this order."},"isPositionTpsl":{"type":"boolean","description":"Indicates if the order is a position TP/SL order."},"reduceOnly":{"type":"boolean","description":"Indicates whether the order is reduce-only."},"orderType":{"enum":["Market","Limit","Stop Market","Stop Limit","Take Profit Market","Take Profit Limit"],"description":"Order type for market execution.\n- `\"Market\"`: Executes immediately at the market price.\n- `\"Limit\"`: Executes at the specified limit price or better.\n- `\"Stop Market\"`: Activates as a market order when a stop price is reached.\n- `\"Stop Limit\"`: Activates as a limit order when a stop price is reached.\n- `\"Take Profit Market\"`: Executes as a market order when a take profit price is reached.\n- `\"Take Profit Limit\"`: Executes as a limit order when a take profit price is reached. "},"tif":{"anyOf":[{"enum":["Gtc","Ioc","Alo","FrontendMarket","LiquidationMarket"],"nullable":true}],"description":"Time-in-force.\n- `\"Gtc\"`: Remains active until filled or canceled.\n- `\"Ioc\"`: Fills immediately or cancels any unfilled portion.\n- `\"Alo\"`: Adds liquidity only.\n- `\"FrontendMarket\"`: Similar to Ioc, used in Hyperliquid UI.\n- `\"LiquidationMarket\"`: Similar to Ioc, used in Hyperliquid UI."},"cloid":{"anyOf":[{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":34,"maxLength":34,"nullable":true}],"description":"Client Order ID."}},"required":["coin","side","limitPx","sz","oid","timestamp","origSz","triggerCondition","isTrigger","triggerPx","children","isPositionTpsl","reduceOnly","orderType","tif","cloid"],"description":"Open order with additional display information."},"description":"Array of open orders with additional display information."}},"required":["dex","user","orders"],"description":"Event of open orders for a specific user."}}}}}}}}}
```
