Skip to main content

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

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 corresponding interface.
startTimeStringNoStart 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)
endTimeStringNoEnd 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. )
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": "",
"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
cancelled: the order is cancelled
>sideStringDirection
Buy; Sell
>forceStringOrder expiration date
(Confirm that if maker is supported)
IOC (Immediate or cancel)
FOK (Fill or kill)
GTC (Good till canceled)
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
cross: cross margin
>reduceOnlyStringWhether or not to just reduce the position.
>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
>presetStopSurplusPriceStringSet TP
>presetStopLossPriceStringSet SL
endId
String
The final order ID.
This is used when idLessThan/idGreaterThan is set as a range.