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
orderIdnororderLinkIdis passed. - The records are sort by the
createdTimefrom newest to oldest.
HTTP Request
GET /contract/v3/private/order/unfilled-orders
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| symbol | false | string | Symbol name |
| baseCoin | false | string | Base coin |
| settleCoin | false | string | Settle coin. One of symbol,baseCoin and settleCoin is required. Priority: symbol > baseCoin > settleCoin |
| orderId | false | string | Order id |
| orderLinkId | false | string | User customised order id |
| orderFilter | false | string | Order: active order, StopOrder: conditional order |
| 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
| Parameter | Type | Comments |
|---|---|---|
| category | string | Product type |
| nextPageCursor | string | Cursor. Used to pagination |
| list | array | string |
| > symbol | string | Symbol name |
| > orderId | string | Order id |
| > orderLinkId | string | User customised order id |
| > side | string | Side. Buy,Sell |
| > orderType | string | Order type. Market,Limit. For TP/SL order, it means the order type after triggered |
| > price | string | Order price |
| > iv | string | Implied volatility. Not applicable for future |
| > qty | string | Order qty |
| > timeInForce | string | Time in force |
| > orderStatus | string | Order status |
| > lastPriceOnCreated | string | Last price when create the order |
| > createdTime | string | Created timestamp (ms) |
| > updatedTime | string | Updated timestamp (ms) |
| > cancelType | string | Cancel type |
| > stopOrderType | string | Stop order type |
| > triggerDirection | string | 1: rise, 2: fall |
| > triggerBy | string | The trigger type of trigger price |
| > triggerPrice | string | Trigger price |
| > cumExecValue | string | Cumulative executed position value |
| > cumExecFee | string | Cumulative trading fee |
| > cumExecQty | string | Cumulative executed qty |
| > leavesValue | string | The remaining value waiting to be traded |
| > leavesQty | string | The remaining quantity waiting to be traded |
| > 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 | Trigger type of take profit |
| > slTriggerBy | string | Trigger type of stop loss |
| > reduceOnly | boolean | Reduce only. true means reduce position size |
| > closeOnTrigger | boolean | Close on trigger. What is a close on trigger order? |
| > smpType | string | SMP execution type |
| > smpGroup | integer | Smp group ID. If the uid has no group, it is 0 by default |
| > smpOrderId | string | The 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
}