Get Current Orders
Description
Query current open orders
HTTP Request
- GET
/api/v3/order/realtime - Supported Products:
spot/linear - Rate Limit: 10 requests per second per UID
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
category | String | Yes | Business type: spot / linear |
orderFilter | string | No | Comma-separated order types: LIMIT, MARKET, PLAN_LIMIT, PLAN_MARKET, OCO, PROFITLOSS_LIMIT, PROFITLOSS_MARKET. |
symbol | String | No | Trading pair name |
limit | integer | No | Standardized pagination parameters (aligned with order request sequence number) - number of items per page (default 20, maximum 100) |
cursor | string | No | Pagination token (pass empty on the first query) |
Response Parameters
| Field | Type | Description |
|---|---|---|
category | string | spot / linear |
orderId | string | Unique order ID. |
orderStatus | string | Order status: NEW = new, PARTIALLY_FILLED = partially executed, FILLED = fully executed, CANCELED = canceled, REJECTED = rejected |
side | string | Trading direction: BUY = buy, SELL = sell |
symbol | string | Trading pair name |
orderType | string | Order type: LIMIT = limit order, MARKET = market order, STOP_LIMIT = stop-loss limit order, TAKE_PROFIT_LIMIT = take-profit limit order |
stopOrderType | string | Stop loss order type: STOP_LOSS = stop loss order, TAKE_PROFIT = take profit order, OCO = one-cancels-the-other order, TRAILING_STOP = trailing stop loss order. |
price | string | Order price (string format to avoid floating-point precision loss) |
orderQty | string | Order quantity (precision matches the trading pair, e.g., 0.0001 BTC for BTC-USDT) |
timeInForce | string | Order validity: GTC = always valid, IOC = immediately execute and cancel remaining, FOK = all execute or cancel, GTX = place order only, no execution. |
orderLinkId | string | Associated order ID (customized by user to link parent and child orders) |
leavesQty | string | Remaining quantity (number of unfilled orders) |
averagePrice | string | Average execution price (total traded value / total traded volume) |
orderPnl | string | order profit and loss (only valid for closing orders. Positive indicates profit, negative indicates loss) |
createdTime | Long | Creation timestamp (millisecond-level, UTC+8, e.g. 1710000000000 represents 2024-03-10 00:00:00) |
updatedTime | Long | timestamp update (millisecond-level, UTC+8, updated upon order status change) |
reduceOnly | boolean | reduce-only: true = only close position, false = can open/close |
tpTriggerBy | string | Take-profit trigger sources: MARK_PRICE = mark price, INDEX_PRICE = index price, LAST_PRICE = last trade price |
slTriggerBy | string | Stop-loss trigger source: MARK_PRICE = mark price, INDEX_PRICE = index price, LAST_PRICE = latest trade price |
takeProfit | string | take-profit price (triggered when this price is reached) |
stopLoss | string | stop-loss price (triggered when this price is reached) |
triggerPrice | string | trigger price (the benchmark price for conditional order activation) |
tpslMode | string | TP/SL Mode: FULL = Take-Profit and Stop-Loss mode, PARTIAL = Partial Take-Profit and Stop-Loss mode |
tpOrderType | string | take-loss order type: LIMIT = limit order, MARKET = market order |
slOrderType | string | take-profit order type: LIMIT = limit order, MARKET = market order |
limitTakeProfit | string | Take-profit price (executed at limit price after take-profit trigger) |
limitStopLoss | string | Limit stop-loss price (the limit price executed after stop-loss trigger) |
executedAmount | string | Trade amount (= cumulative traded quantity × average trade price) |
leavesAmount | string | Remaining trade amount (= remaining quantity × order price) |
quoteTokenName | string | Quote asset name, for example USDT or USD. |
amount | string | order amount (RMB/valuation currency amount for spot orders) |
positionIdx | integer | Position index (unique internal position identifier) |
businessOrderType | string | One of LIMIT, MARKET, PLAN_LIMIT, PLAN_MARKET, OCO, PROFITLOSS_LIMIT, or PROFITLOSS_MARKET. |
parentOrderId | string | Take-profit and stop-loss order parent order ID |
tpTriggerPrice | string | Take-profit trigger price. |
slTriggerPrice | string | Stop-loss trigger price. |
orderAvgPrice | string | Average execution price of order: Sum(Trade Size × Trade Price) / Sum(Trade Size) |
triggerTime | string | Condition order trigger time (milliseconds) |
tpSlExecMode | integer | Only for futures. Price guarantee: 0 = no, 1 = yes |
cumExecQty | string | order executed quantity |
Request Example
GET /api/v3/order/realtime?category=linear&orderFilter=LIMIT&symbol=BTCUSDT HTTP/1.1
Host: openapi.lbank.com
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
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"code": 200,
"message": "Success",
"data": {
"orders": [
{
"category": "linear",
"orderId": "11111111-2222-4333-8444-555555555555",
"orderStatus": "NEW",
"side": "BUY",
"symbol": "BTCUSDT",
"orderType": "LIMIT",
"stopOrderType": "",
"price": "65000",
"orderQty": "0.1",
"timeInForce": "GTC",
"orderLinkId": "example-limit-order-001",
"leavesQty": "0.1",
"averagePrice": "0",
"orderPnl": "0",
"createdTime": 1793160000000,
"updatedTime": 1793160000000,
"reduceOnly": false,
"tpTriggerBy": "",
"slTriggerBy": "",
"takeProfit": "0",
"stopLoss": "0",
"triggerPrice": "0",
"tpslMode": "",
"tpOrderType": "",
"slOrderType": "",
"limitTakeProfit": "0",
"limitStopLoss": "0",
"executedAmount": "0",
"leavesAmount": "6500",
"quoteTokenName": "USDT",
"amount": "",
"positionIdx": 1,
"businessOrderType": "LIMIT",
"parentOrderId": "",
"tpTriggerPrice": "",
"slTriggerPrice": "",
"orderAvgPrice": "0",
"triggerTime": "",
"tpSlExecMode": 0,
"cumExecQty": "0"
}
],
"sumCount": 1,
"cursor": ""
},
"extras": null
}