Skip to main content

Get Order

HTTP Request

GET /spot/v3/private/order

Request Parameters

ParameterRequiredTypeComments
orderIdfalsestringOrder ID. Required if not passing orderLinkId
orderLinkIdfalsestringUnique user-set order ID. Required if not passing orderId
orderCategoryfalseintegerOrder category. 0:normal order by default; 1TP/SL order, Required for TP/SL order.

Response Parameters

ParameterTypeComments
accountIdstringAccount ID
symbolstringName of the trading pair
orderLinkIdstringUser-generated order ID
orderIdstringOrder ID
orderPricestringOrder price
orderQtystringOrder quantity
execQtystringExecuted quantity
cummulativeQuoteQtystringTotal order quantity. For some historical data, it might less than 0, and that means it is not applicable
avgPricestringAverage filled price
statusstringOrder status
timeInForcestringTime in force
orderTypestringOrder type
sidestringOrder direction
stopPricestringStop price
icebergQtystringPlease ignore
createTimestringOrder created time in the match engine
updateTimestringLast time order was updated
isWorkingstringIs working. 0:valid, 1:invalid
lockedstringReserved for order (if it's 0, it means that the funds corresponding to the order have been settled)
blockTradeIdstringParadigm block trade ID
cancelTypestringCancel type. CancelBySmp
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

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

{
"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
}