Skip to main content

Get Triggered Order History

Get Triggered Order History

Query triggered condition order history

Request URL

GET /deepcoin/v2/trade/trigger-orders-history

Request Parameters

FieldRequiredTypeDescription
instIdYesstringInstrument ID, e.g.BTC-USDT-SWAP
ordTypeNostringTrigger order type
Limit: limit
Market: market
limitNointegerNumber of results per request. The maximum is 100; The default is 100. Range: 1-100
ordIdNostringOrder ID

Response Parameters

FieldTypeDescription
instTypestringInstrument type, e.g.SWAP
instIdstringInstrument ID, e.g.BTC-USDT-SWAP
ordIdstringOrder ID
pxstringOrder price
szstringOrder size
triggerPxstringTrigger price
triggerPxTypestringTrigger price type
Last: last
Index: index
Mark: mark
ordTypestringTrigger order type
TPSL: Take-profit/Stop-loss
Conditional: Conditional order
Serial: Serial order
Indicator: Indicator order
Complex: Complex indicator
Tracking: Tracking exit
Line: Line drawing order
sidestringOrder side
Buy: buy
Sell: sell
posSidestringPosition side
Long in open/close mode: long
Short in open/close mode: short
Net mode: net
tdModestringTrade mode
Cross: cross
Isolated: isolated
Cash: cash
leverstringLeverage
slPricestringStop-loss price
slTriggerPricestringStop-loss trigger price
tpPricestringTake-profit price
tpTriggerPricestringTake-profit trigger price
closeSLPricestringOpen position stop-loss price
closeTPPricestringOpen position take-profit price
closeSLTriggerPricestringOpen position stop-loss trigger price
closeTPTriggerPricestringOpen position take-profit trigger price
triggerTimestringTrigger time, Unix timestamp in milliseconds format, e.g.1597026383085
Value 0 means not triggered
uTimestringOrder status update time, Unix timestamp in milliseconds format
cTimestringOrder creation time, Unix timestamp in milliseconds format
errorCodestringError code
0: Success
4: Invalid operation
errorMsgstringError message, e.g.InvalidAction:OrderType=5,CFDPriceIsNull

Response Example

{
"code": "0",
"data": [
{
"instType": "SWAP",
"instId": "BTC-USDT-SWAP",
"ordId": "1000597768449809",
"px": "0",
"sz": "100",
"triggerPx": "74014.6",
"triggerPxType": "last",
"ordType": "TPSL",
"side": "sell",
"posSide": "long",
"tdMode": "cross",
"lever": "17",
"slPrice": "0",
"slTriggerPrice": "74014.6",
"tpPrice": "0",
"tpTriggerPrice": "76642.4",
"closeSLPrice": "0",
"closeSLTriggerPrice": "0",
"closeTPPrice": "0",
"closeTPTriggerPrice": "0",
"triggerTime": "1776347533",
"uTime": "1776347533000",
"cTime": "1776212492000",
"errorCode": "0",
"errorMsg": ""
},
{
"instType": "SWAP",
"instId": "BTC-USDT-SWAP",
"ordId": "1000597768449610",
"px": "0",
"sz": "100",
"triggerPx": "74012.1",
"triggerPxType": "last",
"ordType": "TPSL",
"side": "sell",
"posSide": "long",
"tdMode": "cross",
"lever": "17",
"slPrice": "0",
"slTriggerPrice": "74012.1",
"tpPrice": "0",
"tpTriggerPrice": "76639.8",
"closeSLPrice": "0",
"closeSLTriggerPrice": "0",
"closeTPPrice": "0",
"closeTPTriggerPrice": "0",
"triggerTime": "1776347541",
"uTime": "1776347541000",
"cTime": "1776212488000",
"errorCode": "0",
"errorMsg": ""
}
],
"msg": "Success"
}

Notes

  1. This endpoint returns triggered condition order history, including both successfully triggered and failed triggered orders
  2. triggerTime of 0 indicates the order has not been triggered yet
  3. errorCode of 0 means success, other values indicate failure
  4. px of 0 indicates a market order, non-zero value indicates a limit order
  5. Results are sorted in descending order by update time, with the most recent records first