Skip to main content

Get History Trigger Order

Speed limit is 10 times/s (UID)

Description

Can be used to query one or all previous common orders and trigger orders.

HTTP Request

  • GET /api/v2/mix/order/orders-plan-history
Request Example
curl "https://api.cointr.com/api/v2/mix/order/orders-plan-history?planType=normal_plan&symbol=ETHUSDT&productType=usdt-futures" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \

Request Parameters

ParameterTypeRequiredDescription
orderIdStringNoOrder ID
Either orderId or clientOid is required. If both are entered, orderId prevails.
clientOidStringNoCustomize order ID
Either orderId or clientOid is required. If both are entered, orderId prevails.
planTypeStringYesOrder type
normal_plan: average trigger order
track_plan: trailing stop order
profit_loss: take profit and stop loss orders
planStatusStringNoTrigger order status
If not specified, all states will be queried
executed: the order triggered
fail_trigger: Failed to trigger
cancelled: Cancelled
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 three months. The default end time is three months 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 three months. The default start time is three months ago if no value is set for the start time. )
limitStringNoNumber of queries: Default: 100, maximum: 100
Response Example
{
"code": "00000",
"data": {
"entrustedList": [
{
"planType": "normal_plan",
"symbol": "ethusdt",
"size": "1",
"orderId": "123",
"executeOrderId": "123456",
"clientOid": "",
"planStatus": "executed",
"price": "1990",
"priceAvg": "1999.2",
"baseVolume": "1",
"callbackRatio": "",
"triggerPrice": "1989",
"triggerType": "fill_price",
"side": "buy",
"posSide": "long",
"marginCoin": "usdt",
"marginMode": "cross",
"enterPointSource": "api",
"tradeSide": "open",
"posMode": "hedge_mode",
"orderType": "limit",
"cTime": "1627293504612",
"uTime": "",
"presetStopSurplusPrice": "2001",
"stopSurplusTriggerPrice": "2002",
"stopSurplusTriggerType": "fill_price",
"presetStopLossPrice": "1800",
"stopLossTriggerPrice": "1820",
"stopLossTriggerType": "fill_price"
}
],
"endId": "123"
},
"msg": "success",
"requestTime": 1627293504612
}

Response Parameters

ParameterTypeDescription
entrustedListList<String>Order list
>planTypeStringTrigger order type
normal_plan: average trigger order
track_plan: trailing stop order
>symbolStringTrading pair
>sizeStringAmount
>orderIdStringTrigger order ID
>executeOrderIdStringthe order ID after plan triggered
>clientOidStringCustomized trigger order ID
>planStatusStringOrder status
executed: the order triggered
fail_trigger: Failed to trigger
cancelled: Cancelled
>priceStringOrder price
For a common trigger order, it represents the order price.
For a trailing stop order, this field doesn't exist.
>baseVolumeStringAmount of coins traded
It is only available when the order status is triggered.
callbackRatioStringImplementation of the callback rate. (Maximum 1-10)
Only exists for trailing stop orders.
>triggerPriceStringTrigger price
It appears for both common trigger orders and trailing stop orders.
>triggerTypeStringTrigger type
It appears for both common trigger orders and trailing stop orders.
fill_price: filled price
mark_price: mark price
>sideStringDirection
Buy; Sell
>posSideStringPosition direction
long: hedge mode long position
short: hedge mode short position
net: one-way position
>marginCoinStringMargin coin
>marginModeStringMargin mode
isolated: isolated margin
cross: cross margin
>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: Close (open and close mode)
>posModeStringPosition mode
one_way_mode: one-way mode
hedge_mode: hedge mode
>orderTypeStringOrder type
limit: limit order
market
>cTimeStringCreation time
>uTimeStringLast updated
>presetStopSurplusPriceStringSetting take-profit strike price
>stopSurplusTriggerPriceStringSetting take-profit trigger price
>stopSurplusTriggerTypeStringSetting take-profit trigger type
fill_price: filled price
mark_price: mark price
>presetStopLossPriceStringSetting stop-loss strike price
>stopLossTriggerPriceStringSetting stop-loss trigger price
>stopLossTriggerTypeStringSetting stop-loss trigger type
fill_price: filled price
mark_price: mark price
endIdStringThe last Trigger order ID.
This is used when idLessThan/idGreaterThan is set as a range.