Query Order Detail

Retrieve order details for all order status.

Permission

  • Applies to both primary user and trading portfolio's API Key.
  • Permission: READ.

Rate Limit

  • 1200 requests per 60 seconds

Request Parameters

NameTypeMandatoryDescription
orderIdStringNUnique identifier of the order assigned by the system.
clientOrderIdStringNCustomer-defined order ID , consists of letters(a-z) and numbers(0-9)

Tip:Either orderId or clientOrderId must be sent.query all order state (NEW, OPEN, CANCELLED, FILLED, PARTIALLY_FILLED, REJECT, FAIL)

Response

FieldTypeRemark
portfolioIdStringUnique identifier for the portfolio.
portfolioNameStringName of the portfolio (if applicable).
orderIdStringUnique identifier for the order.
clientOrderIdStringCustomer-defined order ID
orderStateStringOrder state(NEW, OPEN, CANCELLED, FILLED, PARTIALLY_FILLED, REJECT, FAIL) ; For detailed specifications regarding orderState, please refer to this link:https://apiconnex.readme.io/reference/order
symStringTrading pair unique identifier ,example:
BINANCE_SPOT_BTC_USDT, BINANCE_PERP_BTC_USDT
sideStringOrder side: BUY or SELL.
exchangeOrderTypeStringOrder type defined by the exchange (e.g., LIMIT, MARKET).)
exchangeTypeStringThe exchange name (e.g., BINANCE, OKX).)
businessTypeStringType of market (e.g., SPOT, MARGIN, PERP).
orderTypeStringOrder type(DMA, SYSTEM_LIQ, SYSTEM_REDUCE, REPLACE) ; For detailed specifications regarding orderType, please refer to this link:https://apiconnex.readme.io/reference/order
orderQtyStringOrder quantity, note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin
quoteOrderQtyStringTotal quantity in quote currency (if applicable).
limitPriceStringOrder limit price.
timeInForceStringTimeinforce (default GTC, enums:GTC,IOC,FOK,GTX)
executedQtyStringExecuted quantity, note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin
executedAvgPriceStringAverage price of executed fills.
executedAmountStringTotal executed quote amount.
lastExecutedQtyStringQuantity of the most recent execution.
lastExecutedPriceStringPrice of the most recent execution.
lastExecutedAmountStringValue of the most recent execution.
feeStringCumulative trading fee for this order. Positive = fee charged (taker). "0" when the order earned a maker rebate instead (see rebate field).
feeCoinStringCurrency of the trading fee. Empty string if no fee was charged.
rebateStringCumulative maker rebate received. "0" for taker orders. For OKX spot: BUY orders return quote currency, SELL orders return base currency. For Binance spot: returns quote currency. For perpetuals: returns USDT.
rebateCoinStringCurrency of the rebate. Empty string if no rebate was received.
reduceOnlyBooleanWhether the order is reduce-only: true or false.
leverageIntegerLeverage used for the order. When businessType is SPOT/MARGIN, the endpoint returns NULL.
borrowAmountStringAmount borrowed for margin/leverage.
borrowAssetStringAsset borrowed for the order.
positionSideStringPosition side (e.g., LONG, SHORT, NONE).
algoOrderIdStringID of the parent algorithmic order (if applicable).
tpTriggerPriceStringTake-profit trigger price.
tpTriggerTypeStringTake-profit trigger price type:
LAST_PRICE, MARK_PRICE
The default is LAST_PRICE
tpPriceStringTake-profit order price;
If the price is 0, take-profit will be executed at the market price.
slTriggerPriceStringStop-loss trigger price
slTriggerTypeStringStop-loss trigger price type:
LAST_PRICE, MARK_PRICE
The default is LAST_PRICE
slPriceStringStop-loss order price;
If the price is 0, stop-loss will be executed at the market price.
reasonStringFailure reason message, if the order is rejected or cancelled by the system.
actionStringCurrent in-flight action on the order, if any. AMEND_PENDING — amendment submitted, awaiting confirmation. AMEND_COMPLETED — amendment confirmed. AMEND_FAILED — amendment rejected. CANCEL_PENDING — cancel submitted, awaiting confirmation. CANCEL_COMPLETED — cancellation confirmed. CANCEL_FAILED — cancellation rejected. Empty string when no action is in progress.
actionMsgStringAdditional message associated with the current action, if any.
cancelTypeStringReason the order was cancelled. Possible values: USER, EXPIRE, REDUCE_ONLY, LIQUIDATING, SYSTEM, SYM_DELIST. Empty string if the order has not been cancelled.
amendTypeStringReason the order was amended. Possible values: USER, REDUCE_ONLY. Empty string if the order has not been amended.
createAtStringOrder creation timestamp (millisecond).
updateAtStringLast update timestamp (millisecond).
platformStringThe client product the order was placed from.
channelStringThe protocol the order was submitted through.

Example Request

GET /api/v1/trading/order?orderId=2106591138643265

Example Response

{
  "code": 200000,
  "message": "Success",
  "data": {
    "portfolioId": "1732260294043000",
    "portfolioName": "Main Portfolio",
    "orderId": "2106591138643265",
    "clientOrderId": "myorder001",
    "orderState": "FILLED",
    "sym": "BINANCE_SPOT_ETH_USDT",
    "side": "SELL",
    "exchangeOrderType": "LIMIT",
    "exchangeType": "BINANCE",
    "orderType": "DMA",
    "businessType": "SPOT",
    "orderQty": "0.5",
    "quoteOrderQty": "",
    "limitPrice": "3200",
    "timeInForce": "GTC",
    "executedQty": "0.5",
    "executedAmount": "1600",
    "executedAvgPrice": "3200",
    "lastExecutedQty": "0.5",
    "lastExecutedPrice": "3200",
    "lastExecutedAmount": "1600",
    "fee": "1.6",
    "feeCoin": "USDT",
    "rebate": "0",
    "rebateCoin": "",
    "reduceOnly": false,
    "leverage": 1,
    "borrowAmount": "0",
    "borrowAsset": "",
    "positionSide": "NONE",
    "algoOrderId": "",
    "tpTriggerPrice": "",
    "tpTriggerType": "LAST_PRICE",
    "tpPrice": "0",
    "slTriggerPrice": "",
    "slTriggerType": "LAST_PRICE",
    "slPrice": "0",
    "reason": "",
    "action": "",
    "actionMsg": "",
    "cancelType": "",
    "amendType": "",
    "createAt": "1744466400000",
    "updateAt": "1744466410000",
    "platform": "API",
    "channel": "REST"
  }
}
Query Params
string

Order ID

string

Customer-defined order ID , consists of letters(a-z) and numbers(0-9)

Response

Language
LoadingLoading…
Response
Choose an example:
application/json