Get History Order
Rate limit: 10 req/sec/UID
Description
Get history order(It only supports to get the data within 90days. The older data can be downloaded from web)
HTTP Request
- GET /api/v2/mix/order/orders-history
Request Example
curl "https://api.bitget.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 previous request response |
orderSource | String | No | 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 |
startTime | String | No | Start timestamp Unix timestamp in milliseconds format, e.g. 1597026383085 (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 |
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": "-0.00854",
"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 statusfilled : All filledcanceled : the order is cancelled |
>side | String | Directionbuy : buy, sell : sell |
>force | String | Order expiration date (Confirm that if maker is supported) ioc : Immediate or cancelfok : Fill or killgtc : Good till canceledpost_only : 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 modeisolated : isolated margincrossed : cross margin |
>reduceOnly | String | Reduce onlyYES : Yes,NO : No |
>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 time |
>presetStopSurplusPrice | String | Take profit price |
>presetStopLossPrice | String | Stop loss price |