Skip to main content

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

ParameterTypeRequiredDescription
orderIdStringNoOrder ID
If both orderId and clientOid are entered, orderId prevails.
clientOidStringNoCustomize order ID
If both orderId and clientOid are entered, orderId prevails.
symbolStringNoTrading pair, e.g. ETHUSDT
productTypeStringYesProduct type
USDT-FUTURES USDT professional futures
COIN-FUTURES Mixed futures
USDC-FUTURES USDC professional futures
SUSDT-FUTURES USDT professional futures demo
SCOIN-FUTURES Mixed futures demo
SUSDC-FUTURES USDC professional futures demo
idLessThanStringNoRequests the content on the page before this ID (older data), the value input should be the endId of the previous request response
orderSourceStringNoOrder 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
startTimeStringNoStart timestamp
Unix timestamp in milliseconds format, e.g. 1597026383085
(For Managed Sub-Account, the StartTime cannot be earlier than the binding time)
endTimeStringNoEnd timestamp
Unix timestamp in milliseconds format, e.g. 1597026383085
limitStringNoNumber 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

ParameterTypeDescription
endIdStringLast query ended order ID
entrustedListList<Object>Order list
>symbolStringTrading pair
>sizeStringAmount
>orderIdStringOrder ID
>clientOidStringCustom id
>baseVolumeStringAmount of coins traded
>feeStringTransaction fee
>priceStringOrder price
>priceAvgStringAverage order price
>statusStringOrder status
filled: All filled
canceled: the order is cancelled
>sideStringDirection
buy: buy, sell: sell
>forceStringOrder expiration date
(Confirm that if maker is supported)
ioc: Immediate or cancel
fok: Fill or kill
gtc: Good till canceled
post_only: Post only
>totalProfitsStringTotal PnL
>posSideStringPosition direction
long: two-way long position
short: two-way short position
net: one-way position
>marginCoinStringMargin coin
>quoteVolumeStringTrading amount in quoting coin
>leverageStringLeverage
>marginModeStringMargin mode
isolated: isolated margin
crossed: cross margin
>reduceOnlyStringReduce only
YES: Yes,NO: No
>enterPointSourceStringOrder 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
>tradeSideStringDirection
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
>posModeStringPosition mode
one_way_mode: one-way position
hedge_mode: two-way position
>orderTypeStringOrder type
limit: limit order
market: market order
>orderSourceStringOrder 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
>cTimeStringCreation time
>uTimeStringLast updated time
>presetStopSurplusPriceStringTake profit price
>presetStopLossPriceStringStop loss price

How was your Reading Experience with us?