get
https://api.connex.trade/api/v1/trading/history/orders
Retrieve finished orders from the past 7 days.
Permission
- Applies to both primary user and trading portfolio's API Key.
- Permission: READ.
Rate Limit
- 30 requests per 10 seconds
Request Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| sym | String | N | Trading pair unique identifier(example:BINANCE_SPOT_ETH_USDT, OKX_PEPR_ETH_USDT) |
| businessType | String | N | Business type of the trade, for example SPOT, PERP, MARGIN. |
| exchange | String | N | Exchange type, such as BINANCE, OKX, EDX. |
| begin | String | N | Query start millisecond timestamp, the default is to query data from the past 7 days. |
| end | String | N | Query end millisecond timestamp, If not specified, the current time is used. |
| filterExecuted | Boolean | N | Whether to return only executed orders. Default false – return all orders regardless of execution status. |
| page | String | N | Current page number (starting from 1). |
| pageSize | String | N | Page size. Default is 1000, maximum 1000. |
Response
| Field | Type | Remark |
|---|---|---|
| portfolioId | String | Portfolio ID |
| portfolioName | String | Portfolio Name |
| orderId | String | System-generated order ID associated with this order. |
| clientOrderId | String | Customer-defined order ID |
| orderState | String | Order 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 Tip: query order state in CANCELLED/FILLED/PARTIALLY_FILLED/REJECT/FAIL status and in current portfolioId. |
| sym | String | Trading pair unique identifier(example:BINANCE_SPOT_ETH_USDT, OKX_PEPR_ETH_USDT) |
| side | String | Order side: BUY or SELL. |
| exchangeOrderType | String | Exchange order type, e.g. LIMIT, MARKET. |
| exchangeType | String | Venue where the order is placed, e.g. BINANCE, OKX, EDX. |
| orderType | String | Order type(DMA, SYSTEM_LIQ, SYSTEM_REDUCE, REPLACE) ; For detailed specifications regarding orderType, please refer to this link:https://apiconnex.readme.io/reference/order |
| businessType | String | Business type of the order, e.g. SPOT, PERP, MARGIN. |
| orderQty | String | Order quantity, note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin |
| quoteOrderQty | String | Order quote quantity, in units of the quote asset of the trading pair. Primarily used for market buy orders in spot and margin trading (e.g. amount of USDT or BTC to spend). For other order types it may be ignored by the venue. |
| limitPrice | String | Order price |
| timeInForce | String | TimeInForce (default GTC,enums:GTC,IOC,FOK,GTX) |
| reason | String | Failure reason message, if the order is rejected or cancelled by the system. |
| executedQty | String | Executed quantity, note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin |
| executedAvgPrice | String | Average execution price of the filled quantity. |
| executedAmount | String | Total executed quote amount. |
| reduceOnly | String | Reduce-only flag. true means the order can only reduce existing positions; false otherwise. |
| lastExecutedQty | String | Quantity of the most recent fill, in the same unit as executedQty. |
| lastExecutedPrice | String | Price of the most recent fill. |
| lastExecutedAmount | String | Quote amount of the most recent fill. |
| leverage | Integer | Leverage applied to this order or position. When businessType is SPOT/MARGIN, the endpoint returns NULL. |
| fee | String | Cumulative trading fee for this order. Positive = fee charged (taker). "0" when the order earned a maker rebate instead (see rebate field). |
| feeCoin | String | Currency of the trading fee. Empty string if no fee was charged. |
| rebate | String | Cumulative 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. |
| rebateCoin | String | Currency of the rebate. Empty string if no rebate was received. |
| borrowAmount | String | Borrowed amount for margin trading (if applicable). |
| borrowAsset | String | Asset symbol of the borrowed currency. |
| positionSide | String | Position side. In One-Way Mode, this is always NONE. In Hedge Mode, LONG and SHORT indicate the order belongs to the long or short leg of the position. |
| tpTriggerPrice | String | Take-profit trigger price. |
| tpTriggerType | String | Take-profit trigger price type: LAST_PRICE, MARK_PRICE The default is LAST_PRICE |
| tpPrice | String | Take-profit order price; If the price is 0, take-profit will be executed at the market price. |
| slTriggerPrice | String | Stop-loss trigger price |
| slTriggerType | String | Stop-loss trigger price type: LAST_PRICE, MARK_PRICE The default is LAST_PRICE |
| slPrice | String | Stop-loss order price; If the price is 0, stop-loss will be executed at the market price. |
| createAt | String | Order creation time, in milliseconds since Unix epoch. |
| updateAt | String | Last update time of the order, in milliseconds since Unix epoch. |
| cancelType | String | Reason the order was cancelled. Possible values: USER, EXPIRE, REDUCE_ONLY, LIQUIDATING, SYSTEM, SYM_DELIST. Empty string if the order was not cancelled. |
| amendType | String | Reason the order was amended. Possible values: USER, REDUCE_ONLY. Empty string if the order was not amended. |
| algoOrderId | String | Algo / strategy order ID on the venue, if the order is generated by an algorithmic or strategy order. Empty or null for normal orders. |
| platform | String | The client product the order was placed from. |
| channel | String | The protocol the order was submitted through. |
Example Request
GET /api/v1/trading/history/orders?sym=BINANCE_SPOT_ETH_USDT&begin=1744380000000&end=1744466400000&page=1&pageSize=10
Example Response
{
"code": 200000,
"message": "Success",
"data": {
"page": 1,
"pageSize": 10,
"pageNum": 1,
"totalSize": 1,
"list": [
{
"portfolioId": "1732260294043000",
"portfolioName": "Main Portfolio",
"orderId": "2106591138643265",
"clientOrderId": "myorder001",
"orderState": "FILLED",
"sym": "BINANCE_SPOT_ETH_USDT",
"side": "BUY",
"exchangeOrderType": "LIMIT",
"exchangeType": "BINANCE",
"orderType": "DMA",
"businessType": "SPOT",
"orderQty": "0.5",
"quoteOrderQty": "",
"limitPrice": "3100",
"timeInForce": "GTC",
"reason": "",
"executedQty": "0.5",
"executedAvgPrice": "3100",
"executedAmount": "1550",
"reduceOnly": false,
"lastExecutedQty": "0.5",
"lastExecutedPrice": "3100",
"lastExecutedAmount": "1550",
"leverage": 1,
"fee": "1.55",
"feeCoin": "USDT",
"rebate": "0",
"rebateCoin": "",
"borrowAmount": "0",
"borrowAsset": "",
"positionSide": "NONE",
"tpTriggerPrice": "",
"tpTriggerType": "LAST_PRICE",
"tpPrice": "0",
"slTriggerPrice": "",
"slTriggerType": "LAST_PRICE",
"slPrice": "0",
"createAt": "1744380600000",
"updateAt": "1744380615000",
"cancelType": "",
"amendType": "",
"algoOrderId": "",
"platform": "API",
"channel": "REST"
}
]
}
}
