Get Open Orders
Query unfilled or partially filled orders in real-time. To query older order records, please use the order history interface.
Normal account covers: Spot / USDT perpetual / Inverse contract
tip
- You can query by symbol, baseCoin, orderId and orderLinkId, and if you pass multiple params, the system will process them according to this priority: orderId > orderLinkId > symbol > baseCoin.
- The records are sorted by the
createdTime
from newest to oldest.
HTTP Request
GET /cloud/trade/v3/order/realtime
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
category | true | string | Product type
|
symbol | false | string | Symbol name. For linear, either symbol , baseCoin , settleCoin is required |
baseCoin | false | string | Base coin. Supports linear , inverse |
settleCoin | false | string | Settle coin
|
orderId | false | string | Order ID |
orderLinkId | false | string | User customised order ID |
openOnly | false | integer |
|
orderFilter | false | string | Order : activity order, StoppOrder : condition order, only supports futures, tpslOrder : stop loss order, only valid for spot |
limit | false | integer | Limit for data size per page. [1 , 50 ]. Default: 20 |
cursor | false | string | Cursor. Use the nextPageCursor token from the response to retrieve the next page of the result set |
Response Parameters
tip
- Due to historical reasons, the attributes returned in the list object in the response body of this interface start with uppercase letters. Please pay attention when docking!
Parameter | Type | Comments |
---|---|---|
category | string | Product type |
nextPageCursor | string | Refer to the cursor request parameter |
list | array | Object |
> OrderId | string | Order ID |
> OrderLinkId | string | User customised order ID |
> Symbol | string | Symbol name |
> Price | string | Order price |
> Qty | string | Order qty |
> Side | string | Side. Buy ,Sell |
> PositionIdx | integer | Position index. Used to identify positions in different position modes. |
> OrderStatus | string | Order status |
> CancelType | string | Cancel type |
> RejectReason | string | Reject reason. |
> AvgPrice | string | Average filled price. If unfilled, it is "0" |
> LeavesQty | string | The remaining qty not executed. |
> LeavesValue | string | The estimated value not executed. |
> CumExecQty | string | Cumulative executed order qty |
> CumExecValue | string | Cumulative executed order value. |
> CumExecFee | string | Cumulative executed trading fee. |
> TimeInForce | string | Time in force |
> OrderType | string | Order type. Market ,Limit . For TP/SL order, it means the order type after triggered |
> StopOrderType | string | Stop order type |
> OrderIv | string | Implied volatility |
> TriggerPrice | string | Trigger price. If stopOrderType =TrailingStop, it is activate price. Otherwise, it is trigger price |
> TakeProfit | string | Take profit price |
> StopLoss | string | Stop loss price |
> TpslMode | string | TP/SL mode, Full : entire position for TP/SL. Partial : partial position tp/sl. |
> TpLimitPrice | string | The limit order price when take profit price is triggered |
> SlLimitPrice | string | The limit order price when stop loss price is triggered |
> TpTriggerBy | string | The price type to trigger take profit |
> SlTriggerBy | string | The price type to trigger stop loss |
> TriggerDirection | integer | Trigger direction. 1 : rise, 2 : fall |
> TriggerBy | string | The price type of trigger price |
> LastPriceOnCreated | string | Last price when place the order |
> ReduceOnly | boolean | Reduce only. true means reduce position size |
> CloseOnTrigger | boolean | Close on trigger. |
> PlaceType | string | Place type |
> CreatedTime | string | Order created timestamp (ms) |
> UpdatedTime | string | Order updated timestamp (ms) |
Request Example
GET /cloud/trade/v3/order/realtime?symbol=ETHUSDT&category=linear&openOnly=0&limit=1 HTTP/1.1
Host: openapi-testnet.zoomex.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672219525810
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Response Example
{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"OrderId": "fd4300ae-7847-404e-b947-b46980a4d140",
"OrderLinkId": "test-000005",
"Symbol": "ETHUSDT",
"Price": "1600.00",
"Qty": "0.10",
"Side": "Buy",
"IsLeverage": "",
"PositionIdx": 1,
"OrderStatus": "New",
"CancelType": "UNKNOWN",
"RejectReason": "EC_NoError",
"AvgPrice": "0",
"LeavesQty": "0.10",
"LeavesValue": "160",
"CumExecQty": "0.00",
"CumExecValue": "0",
"CumExecFee": "0",
"TimeInForce": "GTC",
"OrderType": "Limit",
"StopOrderType": "UNKNOWN",
"OrderIv": "",
"TriggerPrice": "0.00",
"TakeProfit": "2500.00",
"StopLoss": "1500.00",
"TpTriggerBy": "LastPrice",
"SlTriggerBy": "LastPrice",
"TriggerDirection": 0,
"TriggerBy": "UNKNOWN",
"LastPriceOnCreated": "",
"ReduceOnly": false,
"CloseOnTrigger": false,
"TpslMode": "Full",
"TpLimitPrice": "",
"SlLimitPrice": "",
"PlaceType": "",
"CreatedTime": "1684738540559",
"UpdatedTime": "1684738540561"
}
],
"nextPageCursor": "page_args%3Dfd4300ae-7847-404e-b947-b46980a4d140%26symbol%3D6%26",
"category": "linear"
},
"retExtInfo": {},
"time": 1684765770483
}