Get Order
HTTP Request
GET /spot/v3/private/order
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| orderId | false | string | Order ID. Required if not passing orderLinkId |
| orderLinkId | false | string | Unique user-set order ID. Required if not passing orderId |
| 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 | Order direction |
| stopPrice | string | Stop price |
| icebergQty | string | Please ignore |
| createTime | string | Order created time in the match engine |
| updateTime | string | Last time order was updated |
| isWorking | string | Is working. 0:valid, 1:invalid |
| locked | string | Reserved for order (if it's 0, it means that the funds corresponding to the order have been settled) |
| 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/order?orderLinkId=spotA0010' \
--header 'X-BAPI-SIGN: XXXXX' \
--header 'X-BAPI-API-KEY: {api key}' \
--header 'X-BAPI-TIMESTAMP: 1659076396894' \
--header 'X-BAPI-RECV-WINDOW: 5000'
Response Example
- Normal order
- Stop order
{
"retCode": 0,
"retMsg": "OK",
"result": {
"accountId": "533287",
"symbol": "BTCUSDT",
"orderLinkId": "spotA0010",
"orderId": "1210810256551063296",
"orderPrice": "23500",
"orderQty": "0.01",
"execQty": "0",
"cummulativeQuoteQty": "0",
"avgPrice": "0",
"status": "NEW",
"timeInForce": "GTC",
"orderType": "LIMIT",
"side": "SELL",
"stopPrice": "0.0",
"icebergQty": "0.0",
"createTime": "1659075830464",
"updateTime": "1659075830497",
"isWorking": "1",
"locked": "0.01",
"blockTradeId": "",
"cancelType": "UNKNOWN"
"smpGroup": 0,
"smpOrderId": "",
"smpType": "None"
},
"retExtMap": {},
"retExtInfo": {},
"time": 1659076397365
}
{
"retCode": 0,
"retMsg": "OK",
"result": {
"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
},
"retExtMap": {},
"retExtInfo": {},
"time": 1665131916562
}