Skip to main content

Get Open Orders

Query unfilled or partially filled orders in real-time.

tip
  • At most 500 unfilled or partially filled orders will be returned if neither orderId nor orderLinkId is passed.
  • The records are sort by the createdTime from newest to oldest.

HTTP Request

GET /contract/v3/private/order/unfilled-orders

Request Parameters

ParameterRequiredTypeComments
symbolfalsestringSymbol name
baseCoinfalsestringBase coin
settleCoinfalsestringSettle coin. One of symbol,baseCoin and settleCoin is required. Priority: symbol > baseCoin > settleCoin
orderIdfalsestringOrder id
orderLinkIdfalsestringUser customised order id
orderFilterfalsestringOrder: active order, StopOrder: conditional order
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

ParameterTypeComments
categorystringProduct type
nextPageCursorstringCursor. Used to pagination
listarraystring
> symbolstringSymbol name
> orderIdstringOrder id
> orderLinkIdstringUser customised order id
> sidestringSide. Buy,Sell
> orderTypestringOrder type. Market,Limit. For TP/SL order, it means the order type after triggered
> pricestringOrder price
> ivstringImplied volatility. Not applicable for future
> qtystringOrder qty
> timeInForcestringTime in force
> orderStatusstringOrder status
> lastPriceOnCreatedstringLast price when create the order
> createdTimestringCreated timestamp (ms)
> updatedTimestringUpdated timestamp (ms)
> cancelTypestringCancel type
> stopOrderTypestringStop order type
> triggerDirectionstring1: rise, 2: fall
> triggerBystringThe trigger type of trigger price
> triggerPricestringTrigger price
> cumExecValuestringCumulative executed position value
> cumExecFeestringCumulative trading fee
> cumExecQtystringCumulative executed qty
> leavesValuestringThe remaining value waiting to be traded
> leavesQtystringThe remaining quantity waiting to be traded
> 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
> tpTriggerBystringTrigger type of take profit
> slTriggerBystringTrigger type of stop loss
> reduceOnlybooleanReduce only. true means reduce position size
> closeOnTriggerbooleanClose on trigger. What is a close on trigger order?
> smpTypestringSMP execution type
> smpGroupintegerSmp group ID. If the uid has no group, it is 0 by default
> smpOrderIdstringThe counterparty's orderID which triggers this SMP execution

Request Example

GET /contract/v3/private/order/unfilled-orders?symbol=BTCUSDT HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1670564324211
X-BAPI-RECV-WINDOW: 5000

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"symbol": "BTCUSDT",
"orderId": "806f5fc6-d487-46d1-9a57-4b4964126c90",
"side": "Buy",
"orderType": "Limit",
"stopOrderType": "UNKNOWN",
"price": "26864.40",
"qty": "0.003",
"timeInForce": "PostOnly",
"orderStatus": "New",
"triggerPrice": "0.00",
"orderLinkId": "YLxaWKMiHU",
"createdTime": "1684810640078",
"updatedTime": "1684810640080",
"takeProfit": "0.00",
"stopLoss": "0.00",
"tpTriggerBy": "UNKNOWN",
"slTriggerBy": "UNKNOWN",
"triggerBy": "UNKNOWN",
"reduceOnly": false,
"leavesQty": "0.003",
"leavesValue": "80.5932",
"cumExecQty": "0.000",
"cumExecValue": "0",
"cumExecFee": "0",
"triggerDirection": 0,
"cancelType": "UNKNOWN",
"lastPriceOnCreated": "",
"iv": "",
"closeOnTrigger": false,
"tpslMode": "Full",
"tpLimitPrice": "",
"slLimitPrice": "",
"smpType": "None",
"smpGroup": 0,
"smpOrderId": ""
}
],
"nextPageCursor": "",
"category": ""
},
"retExtInfo": {},
"time": 1684810643363
}