Skip to main content

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

ParameterRequiredTypeComments
categorytruestringProduct type
  • Normal account: spot, linear, inverse
symbolfalsestringSymbol name. For linear, either symbol, baseCoin, settleCoin is required
baseCoinfalsestringBase coin. Supports linear, inverse
settleCoinfalsestringSettle coin
  • linear: either symbol, baseCoin or settleCoin is required
  • spot: not supported
orderIdfalsestringOrder ID
orderLinkIdfalsestringUser customised order ID
openOnlyfalseinteger
  • Normal account: 0(default) - query open orders only
orderFilterfalsestringOrder: activity order, StoppOrder: condition order, only supports futures, tpslOrder: stop loss order, only valid for spot
limitfalseintegerLimit for data size per page. [1, 50]. Default: 20
cursorfalsestringCursor. 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!
ParameterTypeComments
categorystringProduct type
nextPageCursorstringRefer to the cursor request parameter
listarrayObject
> OrderIdstringOrder ID
> OrderLinkIdstringUser customised order ID
> SymbolstringSymbol name
> PricestringOrder price
> QtystringOrder qty
> SidestringSide. Buy,Sell
> PositionIdxintegerPosition index. Used to identify positions in different position modes.
> OrderStatusstringOrder status
> CancelTypestringCancel type
> RejectReasonstringReject reason.
> AvgPricestringAverage filled price. If unfilled, it is "0"
> LeavesQtystringThe remaining qty not executed.
> LeavesValuestringThe estimated value not executed.
> CumExecQtystringCumulative executed order qty
> CumExecValuestringCumulative executed order value.
> CumExecFeestringCumulative executed trading fee.
> TimeInForcestringTime in force
> OrderTypestringOrder type. Market,Limit. For TP/SL order, it means the order type after triggered
> StopOrderTypestringStop order type
> OrderIvstringImplied volatility
> TriggerPricestringTrigger price. If stopOrderType=TrailingStop, it is activate price. Otherwise, it is trigger price
> TakeProfitstringTake profit price
> StopLossstringStop loss price
> TpslModestringTP/SL mode, Full: entire position for TP/SL. Partial: partial position tp/sl.
> TpLimitPricestringThe limit order price when take profit price is triggered
> SlLimitPricestringThe limit order price when stop loss price is triggered
> TpTriggerBystringThe price type to trigger take profit
> SlTriggerBystringThe price type to trigger stop loss
> TriggerDirectionintegerTrigger direction. 1: rise, 2: fall
> TriggerBystringThe price type of trigger price
> LastPriceOnCreatedstringLast price when place the order
> ReduceOnlybooleanReduce only. true means reduce position size
> CloseOnTriggerbooleanClose on trigger.
> PlaceTypestringPlace type
> CreatedTimestringOrder created timestamp (ms)
> UpdatedTimestringOrder 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
}