Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
Websocket
Introduction
Futures
    Public
    Private
      Account channelEquity ChannelFill ChannelPosition ChannelHistory Position ChannelOrder ChannelTrigger Order ChannelCancel Order ChannelPlace Order ChannelADL Notification Channel
Spot
Margin
Private

Trigger Order Channel

Description

Subscribe trigger order channel

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

Code
{ "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-M Futures
COIN-FUTURES Coin-M Futures
USDC-FUTURES USDC-M Futures
> instIdStringNoTrading pair
Code
{ "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-M Futures
COIN-FUTURES Coin-M Futures
USDC-FUTURES USDC-M Futures
> instIdStringProduct ID
codeStringError code
msgStringError message
Code
{ "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", "executePrice": "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-M Futures
COIN-FUTURES Coin-M Futures
USDC-FUTURES USDC-M Futures
> 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 value, trigger order
tp take profit
sl stop loss
ptp take profit
psl stop loss
track stop
mtpsl TP/SL
> priceStringOrder price
> executePriceStringExecute 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
Order ChannelCancel Order Channel
JSON
JSON
JSON