Open Orders
HTTP Request
GET /spot/v3/private/open-orders
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| symbol | false | string | Name of the trading pair |
| orderId | false | string | Specify orderId to return all the orders that orderId of which are smaller than this particular one for pagination purpose |
| limit | false | integer | Limit for data size. [1, 500]. Default: 500 |
| orderCategory | false | integer | Order category. 0:normal order by default; 1:TP/SL order, Required for TP/SL order. |
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| accountId | string | Account ID |
| symbol | string | Name of the trading pair |
| orderLinkId | string | User-generated order ID |
| orderId | string | Order ID |
| orderPrice | string | Order price |
| orderQty | string | Order quantity |
| execQty | string | Executed quantity |
| cummulativeQuoteQty | string | Total order quantity. For some historical data, it might less than 0, and that means it is not applicable |
| avgPrice | string | Average filled price |
| status | string | Order status |
| timeInForce | string | Time in force |
| orderType | string | Order type |
| side | string | Side. BUY, SELL |
| stopPrice | string | Stop price |
| icebergQty | string | Please ignore |
| createTime | integer | Order created time in the match engine |
| updateTime | integer | Last time order was updated |
| isWorking | string | Is working. 0:valid, 1:invalid |
| orderCategory | integer | Order category. 0:normal order; 1:TP/SL order. TP/SL order has this field |
| triggerPrice | string | Trigger price. TP/SL order has this field |
| blockTradeId | string | Paradigm block trade ID |
| cancelType | string | Cancel type. CancelBySmp |
| 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
curl --location --request GET 'https://api-testnet.bybit.com/spot/v3/private/open-orders?symbol=BTCUSDT' \
--header 'X-BAPI-SIGN: e28768ea749013bbd0eb38edf78e1cac187d3018e4807859a84a37cf52feb5c0' \
--header 'X-BAPI-API-KEY: {api key}' \
--header 'X-BAPI-TIMESTAMP: 1659081676022' \
--header 'X-BAPI-RECV-WINDOW: 5000'
Response Example
- Normal order
- Stop order
{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"accountId": "533287",
"symbol": "BTCUSDT",
"orderLinkId": "spotx004",
"orderId": "1210858291884732160",
"orderPrice": "23500",
"orderQty": "0.02",
"execQty": "0",
"cummulativeQuoteQty": "0",
"avgPrice": "0",
"status": "NEW",
"timeInForce": "GTC",
"orderType": "LIMIT_MAKER",
"side": "SELL",
"stopPrice": "0.0",
"icebergQty": "0.0",
"createTime": 1659081556722,
"updateTime": 1659081556740,
"isWorking": "1",
"blockTradeId": "",
"cancelType": "UNKNOWN"
"smpGroup": 0,
"smpOrderId": "",
"smpType": "None"
}
]
},
"retExtInfo": {},
"time": 1659081570356
}
{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"accountId": "533287",
"symbol": "BTCUSDT",
"orderLinkId": "testSpot_25",
"orderId": "1261611660550946304",
"orderPrice": "17000",
"orderQty": "0.1",
"status": "ORDER_NEW",
"timeInForce": "GTC",
"orderType": "LIMIT",
"side": "BUY",
"stopPrice": "0.0",
"icebergQty": "0.0",
"createTime": 1665131829743,
"updateTime": 1665131829743,
"isWorking": "1",
"executedOrderId": "1261611660550946305",
"triggerPrice": "22000",
"orderCategory": 1
}
]
},
"retExtInfo": {},
"time": 1665131839884
}