Skip to main content

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​

FieldTypeRequiredDescription
categoryStringYesBusiness type: spot / linear
orderFilterstringNoComma-separated order types: LIMIT, MARKET, PLAN_LIMIT, PLAN_MARKET, OCO, PROFITLOSS_LIMIT, PROFITLOSS_MARKET.
symbolStringNoTrading pair name
limitintegerNoStandardized pagination parameters (aligned with order request sequence number) - number of items per page (default 20, maximum 100)
cursorstringNoPagination token (pass empty on the first query)

Response Parameters​

FieldTypeDescription
categorystringspot / linear
orderIdstringUnique order ID.
orderStatusstringOrder status: NEW = new, PARTIALLY_FILLED = partially executed, FILLED = fully executed, CANCELED = canceled, REJECTED = rejected
sidestringTrading direction: BUY = buy, SELL = sell
symbolstringTrading pair name
orderTypestringOrder type: LIMIT = limit order, MARKET = market order, STOP_LIMIT = stop-loss limit order, TAKE_PROFIT_LIMIT = take-profit limit order
stopOrderTypestringStop 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.
pricestringOrder price (string format to avoid floating-point precision loss)
orderQtystringOrder quantity (precision matches the trading pair, e.g., 0.0001 BTC for BTC-USDT)
timeInForcestringOrder validity: GTC = always valid, IOC = immediately execute and cancel remaining, FOK = all execute or cancel, GTX = place order only, no execution.
orderLinkIdstringAssociated order ID (customized by user to link parent and child orders)
leavesQtystringRemaining quantity (number of unfilled orders)
averagePricestringAverage execution price (total traded value / total traded volume)
orderPnlstringorder profit and loss (only valid for closing orders. Positive indicates profit, negative indicates loss)
createdTimeLongCreation timestamp (millisecond-level, UTC+8, e.g. 1710000000000 represents 2024-03-10 00:00:00)
updatedTimeLongtimestamp update (millisecond-level, UTC+8, updated upon order status change)
reduceOnlybooleanreduce-only: true = only close position, false = can open/close
tpTriggerBystringTake-profit trigger sources: MARK_PRICE = mark price, INDEX_PRICE = index price, LAST_PRICE = last trade price
slTriggerBystringStop-loss trigger source: MARK_PRICE = mark price, INDEX_PRICE = index price, LAST_PRICE = latest trade price
takeProfitstringtake-profit price (triggered when this price is reached)
stopLossstringstop-loss price (triggered when this price is reached)
triggerPricestringtrigger price (the benchmark price for conditional order activation)
tpslModestringTP/SL Mode: FULL = Take-Profit and Stop-Loss mode, PARTIAL = Partial Take-Profit and Stop-Loss mode
tpOrderTypestringtake-loss order type: LIMIT = limit order, MARKET = market order
slOrderTypestringtake-profit order type: LIMIT = limit order, MARKET = market order
limitTakeProfitstringTake-profit price (executed at limit price after take-profit trigger)
limitStopLossstringLimit stop-loss price (the limit price executed after stop-loss trigger)
executedAmountstringTrade amount (= cumulative traded quantity × average trade price)
leavesAmountstringRemaining trade amount (= remaining quantity × order price)
quoteTokenNamestringQuote asset name, for example USDT or USD.
amountstringorder amount (RMB/valuation currency amount for spot orders)
positionIdxintegerPosition index (unique internal position identifier)
businessOrderTypestringOne of LIMIT, MARKET, PLAN_LIMIT, PLAN_MARKET, OCO, PROFITLOSS_LIMIT, or PROFITLOSS_MARKET.
parentOrderIdstringTake-profit and stop-loss order parent order ID
tpTriggerPricestringTake-profit trigger price.
slTriggerPricestringStop-loss trigger price.
orderAvgPricestringAverage execution price of order: Sum(Trade Size × Trade Price) / Sum(Trade Size)
triggerTimestringCondition order trigger time (milliseconds)
tpSlExecModeintegerOnly for futures. Price guarantee: 0 = no, 1 = yes
cumExecQtystringorder 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
}