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
| Field | Type | Required | Description |
|---|---|---|---|
category | string | Yes | spot for spot or linear for futures. |
symbol | string | No | Contract/trading pair name |
baseCoin | string | No | Base asset, such as BTC. |
orderId | string | No | Order ID. Supply either orderId or orderLinkId. For a batch query, pass up to 50 comma-separated IDs in the selected field. |
orderLinkId | string | No | External 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.
| Field | Type | Description |
|---|---|---|
symbol | string | Contract or trading pair name (for example, BTC-USDT). |
symbolId | integer | Unique contract or trading pair ID. |
orderId | string | Unique order ID. |
leverage | integer | Leverage multiplier. |
baseCoin | string | Base asset. |
side | string | Order side, BUY or SELL. |
orderQty | string | Order quantity. |
orderStatus | string | Order status: DEACTIVATED = discontinued/invalid, PARTIALLYFILLEDCANCELED = partially executed and canceled, NEW = new PARTIALLYFILLED / PARTIALLY_FILLED = partially executed FILLED = fully executed, CANCELED = canceled, REJECTED = Rejected |
createdTime | string | Order creation timestamp in milliseconds (UTC+8). |
updatedTime | string | Last update timestamp in milliseconds (UTC+8). |
cumExecQty | string | Cumulative filled quantity. |
cumExecFee | string | Cumulative trading fee. |
executedAmount | string | Executed amount. |
orderValue | string | Order value. |
reduceOnly | integer | 1 for reduce-only, 0 otherwise. |
accountMode | string | CROSS for cross margin, ISOLATED for isolated margin. |
amount | string | Order amount. |
avgPrice | string | Average execution price. |
tpLimitPrice | string | Take-profit limit price. |
isLiquid | boolean | true for a liquidation order, false for an ordinary order. |
tpTriggerPrice | string | Take-profit trigger price. |
slTriggerPrice | string | Stop-loss trigger price. |
triggerPrice | string | Trigger price. |
triggerTime | string | Trigger timestamp in milliseconds. |
category | string | spot for spot or linear for perpetual futures. |
stopOrderType | integer | 1 futures conditional, 2 position take-profit, 3 position stop-loss, 6 partial take-profit, 7 partial stop-loss, 8 spot conditional, 10 spot OCO. |
slLimitPrice | string | Stop-loss limit price. |
businessOrderType | string | LIMIT / MARKET / PLAN_LIMIT / PLAN_MARKET / OCO / PROFITLOSS_LIMIT / PROFITLOSS_MARKET |
orderPrice | string | Order price. |
cumClosedPnl | string | Cumulative closed profit and loss. |
action | string | 1 open long, 2 open short, 3 close long, 4 close short. |
settleCoin | string | Settlement asset. |
isSolated | integer | 1 for isolated margin, 0 for cross margin. |
rejectReason | string | Order 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
}