Skip to main content

Get Order Details

Description​

Query order details, supporting both current and historical order details

HTTP Request​

  • POST /api/v3/order/user/his/detail
  • Supported Products: spot / linear
  • Rate Limit: 10 requests per second per UID

Request Parameters​

FieldTypeRequiredDescription
categorystringYesspot for spot or linear for futures.
symbolstringNoContract/trading pair name
baseCoinstringNoBase asset, such as BTC.
orderIdstringNoOrder ID. Supply either orderId or orderLinkId. For a batch query, pass up to 50 comma-separated IDs in the selected field.
orderLinkIdstringNoExternal order ID. Supply either orderId or orderLinkId. For a batch query, pass up to 50 comma-separated IDs in the selected field.

Response Parameters​

A single-order query returns data.item. A batch query returns data.itemList.

FieldTypeDescription
symbolstringContract or trading pair name (for example, BTC-USDT).
symbolIdintegerUnique contract or trading pair ID.
orderIdstringUnique order ID.
leverageintegerLeverage multiplier.
baseCoinstringBase asset.
sidestringOrder side, BUY or SELL.
orderQtystringOrder quantity.
orderStatusstringOrder status:
DEACTIVATED = discontinued/invalid,
PARTIALLYFILLEDCANCELED = partially executed and canceled,
NEW = new
PARTIALLYFILLED / PARTIALLY_FILLED = partially executed
FILLED = fully executed,
CANCELED = canceled,
REJECTED = Rejected
createdTimestringOrder creation timestamp in milliseconds (UTC+8).
updatedTimestringLast update timestamp in milliseconds (UTC+8).
cumExecQtystringCumulative filled quantity.
cumExecFeestringCumulative trading fee.
executedAmountstringExecuted amount.
orderValuestringOrder value.
reduceOnlyinteger1 for reduce-only, 0 otherwise.
accountModestringCROSS for cross margin, ISOLATED for isolated margin.
amountstringOrder amount.
avgPricestringAverage execution price.
tpLimitPricestringTake-profit limit price.
isLiquidbooleantrue for a liquidation order, false for an ordinary order.
tpTriggerPricestringTake-profit trigger price.
slTriggerPricestringStop-loss trigger price.
triggerPricestringTrigger price.
triggerTimestringTrigger timestamp in milliseconds.
categorystringspot for spot or linear for perpetual futures.
stopOrderTypeinteger1 futures conditional, 2 position take-profit, 3 position stop-loss, 6 partial take-profit, 7 partial stop-loss, 8 spot conditional, 10 spot OCO.
slLimitPricestringStop-loss limit price.
businessOrderTypestringLIMIT / MARKET / PLAN_LIMIT / PLAN_MARKET / OCO / PROFITLOSS_LIMIT / PROFITLOSS_MARKET
orderPricestringOrder price.
cumClosedPnlstringCumulative closed profit and loss.
actionstring1 open long, 2 open short, 3 close long, 4 close short.
settleCoinstringSettlement asset.
isSolatedinteger1 for isolated margin, 0 for cross margin.
rejectReasonstringOrder rejection reason.

Request Example​

POST /api/v3/order/user/his/detail HTTP/1.1
Host: openapi.lbank.com
Content-Type: application/json
ex-api-key: <your_api_key>
ex-timestamp: <current_unix_timestamp_ns>
ex-nonce: <unique_random_hex>
ex-signature: <your_signature>
ex-client-type: API

{
"orderLinkId": "337f62ce-cf99-4ef7-bd07-e2f344a2e2a4",
"symbol": "SILVERUSDT",
"category": "linear"
}

Response Example​

{
"code": 200,
"message": "success",
"data": {
"item": {
"symbol": "SILVERUSDT",
"symbolId": 100133,
"orderId": "86f30462-0a11-490e-8b9a-5386daf9fc41",
"orderType": "LIMIT",
"side": "SELL",
"orderPrice": "25.13"
},
"cursor": "",
"sumCount": 0,
"resultCode": 0,
"resultMessage": ""
},
"extras": null
}

Batch Request Example​

{
"orderId": "86f30462-0a11-490e-8b9a-5386daf9fc41,86f30462-0a11-490e-8b9a-5386daf9fc42",
"symbol": "SILVERUSDT",
"category": "linear"
}

Batch Response Example​

{
"code": 200,
"message": "success",
"data": {
"itemList": [
{
"symbol": "SILVERUSDT",
"symbolId": 100133,
"orderId": "86f30462-0a11-490e-8b9a-5386daf9fc41",
"orderType": "LIMIT",
"side": "SELL",
"orderPrice": "25.13"
},
{
"symbol": "SILVERUSDT",
"symbolId": 100133,
"orderId": "86f30462-0a11-490e-8b9a-5386daf9fc42",
"orderType": "LIMIT",
"side": "BUY",
"orderPrice": "25.13"
}
],
"cursor": "",
"sumCount": 0,
"resultCode": 0,
"resultMessage": ""
},
"extras": null
}