Skip to main content

Trigger Order Channel

Description

Subscribe trigger order channel

Data will be pushed when the trigger plans are opened,cancelled,modified,triggered.

Request Example
{
"op": "subscribe",
"args": [
{
"instType": "USDT-FUTURES",
"channel": "orders-algo",
"instId": "default"
}
]
}

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation, subscribe unsubscribe
argsList<Object>YesList of channels to request subscription
> channelStringYesChannel name:orders-algo
> instTypeStringYesProduct 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
> instIdStringNoTrading pair
Response Example
{
"event": "subscribe",
"arg": {
"instType": "USDT-FUTURES",
"channel": "orders-algo",
"instId": "default"
}
}

Response Parameters

ParameterTypeDescription
eventStringEvent
argObjectSubscribed channels
> channelStringChannel name: orders-algo
> instTypeStringProduct 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
> instIdStringProduct ID
codeStringError code
msgStringError message
Push Data
{
"action": "snapshot",
"arg": {
"instType": "USDT-FUTURES",
"channel": "orders-algo",
"instId": "default"
},
"data": [
{
"instId": "BTCUSDT",
"orderId": "1",
"clientOid": "1",
"triggerPrice": "27000.000000000",
"triggerType": "fill_price",
"triggerTime": "1695719197612",
"planType": "pl",
"price": "27000.000000000",
"size": "0.020000000",
"actualSize": "0.000000000",
"orderType": "market",
"side": "buy",
"tradeSide": "open",
"posSide": "long",
"marginCoin": "USDT",
"status": "live",
"posMode": "hedge_mode",
"enterPointSource": "web",
"stopSurplusTriggerType": "fill_price",
"stopLossTriggerType": "fill_price",
"stpMode": "cancel_taker",
"cTime": "1695719197612",
"uTime": "1695719197612"
}
],
"ts": 1695719197733
}

Push Parameters

ParameterTypeDescription
actionStringPush action
argObjectChannels with successful subscription
> channelStringChannel name: orders-algo
> instTypeStringProduct 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
> instIdStringProduct ID
delivery contract reference:https://www.bitget.com/api-doc/common/release-note
dataList<Object>Subscription data
> instIdStringProduct ID
delivery contract reference:https://www.bitget.com/api-doc/common/release-note
> orderIdStringBot order ID
> clientOidStringCustomized bot order ID
> triggerPriceStringTrigger price
> triggerTypeStringTrigger type
fill_price: filled price
mark_price: mark price
> triggerTimeStringTrigger time, ms
> planTypeStringWebsocket trigger order type. Data will be pushed when modify,cancel,open,triggered the plan types below
pl:Default value, trigger order
tp:Partial take profit
sl:Partial stop loss
ptp:Position take profit
psl:Position stop loss
track:Trailing stop
mtpsl:Trailing TP/SL
> priceStringOrder price
> sizeStringOriginal order amount in coin
> actualSizeStringActual number of orders in coin
> orderTypeStringOrder type
limit: limit order
market
> sideStringOrder direction,
> tradeSideStringTrade Side trading direction
> posSideStringPosition direction;
> marginCoinStringMargin coin
> statusStringOrder status
live: plan order created
executed: executed
fail_execute: execute failed
cancelled: cancelled
executing: executing
> posModeStringPosition mode
one_way_mode: one-way position mode
hedge_mode: hedge postion mode
> 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
> stopSurplusPriceStringPreset/Partial/Position position take-profit execution price;
1. When planType is pl, it represents the preset take-profit execution price.
2. When planType is tp, it represents the partial take-profit execution price.
3. When planType is ptp, it represents the position take-profit execution price.
> stopSurplusTriggerPriceStringPreset/Partial/Position take-profit trigger price;
1. When planType is pl, it represents the preset take-profit trigger price.
2. When planType is tp, it represents the partial take-profit trigger price.
3. When planType is ptp, it represents the position take-profit trigger price.
It is empty when there is nothing.
> stopSurplusTriggerTypeStringPreset/Partial/Position take-profit trigger type;
1. When planType is pl, it represents the preset take-profit trigger type.
2. When planType is tp, it represents the partial take-profit trigger type.
3. When planType is ptp, it represents the position take-profit trigger type.
It is empty when there is nothing.
> stopLossPriceStringPreset/Partial/Position stop-loss execution price;
1. When planType is pl, it represents the preset stop-loss execution price.
2. When planType is sl, it represents the partial stop-loss execution price.
3. When planType is psl, it represents the position stop-loss execution price.
It is empty when there is nothing.
> stopLossTriggerPriceStringPreset/Partial/Position stop-loss trigger price;
1. When planType is pl, it represents the preset stop-loss trigger price.
2. When planType is sl, it represents the partial stop-loss trigger price.
3. When planType is psl, it represents the position stop-loss trigger price.
> stopLossTriggerTypeStringPreset/Partial/Position stop-loss trigger type;
1. When planType is pl, it represents the preset stop-loss trigger type.
2. When planType is sl, it represents the partial stop-loss trigger type.
3. When planType is psl, it represents the position stop-loss trigger type.
It is empty when there is nothing.
> uTimeStringOrder update time, Milliseconds format of updated data timestamp Unix, e.g. 1597026383085
> stpModeStringSTP Mode
none not setting STP
cancel_taker cancel taker order
cancel_maker cancel maker order
cancel_both cancel both of taker and maker orders

How was your Reading Experience with us?