Get History Order
Speed limit is 10 times/s for average users. Frequency limit imposed according to user ID
Description
Get history order
HTTP Request
- GET /api/v2/mix/order/orders-history
Request Example
curl "https://api.cointr.com/api/v2/mix/order/orders-history?productType=usdt-futures" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json"
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
orderId | String | No | Order ID If both orderId and clientOid are entered, orderId prevails. |
clientOid | String | No | Customize order ID If both orderId and clientOid are entered, orderId prevails. |
symbol | String | No | Trading pair, e.g. ETHUSDT |
productType | String | Yes | Product typeUSDT-FUTURES USDT professional futuresCOIN-FUTURES Mixed futuresUSDC-FUTURES USDC professional futuresSUSDT-FUTURES USDT professional futures demoSCOIN-FUTURES Mixed futures demoSUSDC-FUTURES USDC professional futures demo |
idLessThan | String | No | Requests the content on the page before this ID (older data), the value input should be the endId of the corresponding interface. |
startTime | String | No | Start timestamp Unix timestamp in milliseconds format, e.g. 1597026383085 (The maximum time span supported is a week. The default end time is a week if no value is set for the end time. ) (For Managed Sub-Account, the StartTime cannot be earlier than the binding time) |
endTime | String | No | End timestamp Unix timestamp in milliseconds format, e.g. 1597026383085 (The maximum time span supported is a week. The default start time is a week ago if no value is set for the start time. ) |
limit | String | No | Number of queries: Maximum: 100, default: 100 |
Response Example
{
"code": "00000",
"data": {
"entrustedList": [
{
"symbol": "ethusdt",
"size": "100",
"orderId": "123",
"clientOid": "12321",
"baseVolume": "12.1",
"fee": "",
"price": "1900",
"priceAvg": "1903",
"status": "filled",
"side": "buy",
"force": "gtc",
"totalProfits": "0",
"posSide": "long",
"marginCoin": "usdt",
"quoteVolume": "22001.21",
"leverage": "20",
"marginMode": "cross",
"enterPointSource": "api",
"tradeSide": "open",
"posMode": "hedge_mode",
"orderType": "limit",
"orderSource": "normal",
"cTime": "1627293504612",
"uTime": "1627293505612",
"presetStopSurplusPrice": "2001",
"presetStopLossPrice": "1800"
}
],
"endId": "123"
},
"msg": "success",
"requestTime": 1627293504612
}
Response Parameters
Parameter | Type | Description |
---|---|---|
endId | String | Last query ended order ID |
entrustedList | List<Object> | Order list |
>symbol | String | Trading pair |
>size | String | Amount |
>orderId | String | Order ID |
>clientOid | String | Custom id |
>baseVolume | String | Amount of coins traded |
>fee | String | Transaction fee |
>price | String | Order price |
>priceAvg | String | Average order price |
>status | String | Order status filled: All filled cancelled: the order is cancelled |
>side | String | Direction Buy; Sell |
>force | String | Order expiration date (Confirm that if maker is supported) IOC (Immediate or cancel) FOK (Fill or kill) GTC (Good till canceled) Post only |
>totalProfits | String | Total PnL |
>posSide | String | Position directionlong : two-way long positionshort : two-way short positionnet : one-way position |
>marginCoin | String | Margin coin |
>quoteVolume | String | Trading amount in quoting coin |
>leverage | String | Leverage |
>marginMode | String | Margin mode isolated: isolated margin cross: cross margin |
>reduceOnly | String | Whether or not to just reduce the position. |
>enterPointSource | String | Order source WEB: Orders created on the website API: Orders created on API SYS: System managed orders, usually generated by forced liquidation logic ANDROID: Orders created on the Android app IOS: Orders created on the iOS app |
>tradeSide | String | Direction open (open and close mode) close (open and close mode) reduce_close_long Liquidate partial long positions reduce_close_short Liquidate partial short positions offset_close_long Liquidate partial long positions for netting offset_close_short Liquidate partial short positions for netting burst_close_long Liquidate long positions burst_close_short Liquidate short positions delivery_close_long Long position delivery delivery_close_short Short position delivery |
>posMode | String | Position modeone_way_mode : one-way positionhedge_mode : two-way position |
>orderType | String | Order type limit: limit order market: market order |
>orderSource | String | Order sources normal: Normal order market: market order profit_market: Market TP order loss_market: Market SL order Trader_delegate: Elite trade order trader_profit: Trader takes profit trader_loss: Trader stops loss reverse: Reversed orders trader_reverse: Reversed elite trades profit_limit: Take-profit limit order loss_limit: Stop-loss limit order liquidation: Liquidation order delivery_close_long: close long positions delivery_close_short: close short positions pos_profit_limit: Position take-profit limit order pos_profit_market: Position take-profit market order pos_loss_limit: Position stop-loss limit order pos_loss_market: Position stop-loss market order |
>cTime | String | Creation time |
>uTime | String | Last updated |
>presetStopSurplusPrice | String | Set TP |
>presetStopLossPrice | String | Set SL endId String The final order ID. This is used when idLessThan/idGreaterThan is set as a range. |