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

Order Channel

Description

Subscribe the order channel

Data will be pushed when the following events occured:

  1. Open/Close orders are created
  2. Open/Close orders are filled
  3. Orders canceled
Code
{ "op": "subscribe", "args": [ { "instType": "USDT-FUTURES", "channel": "orders", "instId": "default" } ] }

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation, subscribe unsubscribe
argsList<Object>YesList of channels to request subscription
> channelStringYesChannel name: orders
> instTypeStringYesProduct type
USDT-FUTURES USDT-M Futures
COIN-FUTURES Coin-M Futures
USDC-FUTURES USDC-M Futures
> instIdStringNoTrading pair, e.g. BTCUSDT
default: All trading pairs
For settled Futures, it only supports default
Code
{ "event": "subscribe", "arg": { "instType": "USDT-FUTURES", "channel": "orders", "instId": "default" } }

Response Parameters

ParameterTypeDescription
eventStringEvent
argObjectSubscribed channels
> channelStringChannel name: orders
> instTypeStringProduct type
USDT-FUTURES USDT-M Futures
COIN-FUTURES Coin-M Futures
USDC-FUTURES USDC-M Futures
> instIdStringProduct ID
codeStringError code
msgStringError message
Code
{ "data": [ { "leverage": "12", "orderType": "limit", "presetStopLossType": "fill_price", "tradeSide": "open", "orderId": "13333333333333333333", "presetStopSurplusExecutePrice": "3200", "feeDetail": [ { "feeCoin": "USDT", "fee": "0.00000000" } ], "cTime": "1760461517274", "posMode": "hedge_mode", "marginMode": "crossed", "presetStopLossExecutePrice": "2800", "posSide": "long", "price": "3000", "enterPointSource": "API", "cancelReason": "", "accBaseVolume": "0", "stpMode": "none", "side": "buy", "totalProfits": "0", "marginCoin": "USDT", "notionalUsd": "1200", "instId": "ETHUSDT", "presetStopSurplusPrice": "3200", "size": "0.4", "reduceOnly": "no", "presetStopLossPrice": "2800", "force": "gtc", "uTime": "1760461517274", "presetStopSurplusType": "fill_price", "clientOid": "12354678990111", "status": "live" } ], "arg": { "instType": "USDT-FUTURES", "instId": "default", "channel": "orders" }, "action": "snapshot", "ts": 1760461517285 }

Push Parameters

ParameterTypeDescription
argObjectChannels with successful subscription
> channelStringChannel name: orders
> 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
> orderIdStringOrder ID
> clientOidStringCustomized order ID
> priceStringOrder price
> sizeStringOriginal order amount in coin
> posModeStringPosition Mode
one_way_mode:one-way mode
hedge-mode: hedge 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
> tradeSideStringDirection
close: Close (open and close mode)
open: Open (open and close mode)
reduce_close_long: Liquidate partial long positions for hedge position mode
reduce_close_short:Liquidate partial short positions for hedge position mode
burst_close_long:Liquidate long positions for hedge position mode
burst_close_short:Liquidate short positions for hedge position mode
offset_close_long:Liquidate partial long positions for netting for hedge position mode
offset_close_short:Liquidate partial short positions for netting for hedge position mode
delivery_close_long:Delivery long positions for hedge position mode
delivery_close_short:Delivery short positions for hedge position mode
dte_sys_adl_close_long:ADL close long position for hedge position mode
dte_sys_adl_close_short:ADL close short position for hedge position mode
buy_single:Buy, one way postion mode
sell_single:Sell, one way postion mode
reduce_buy_single:Liquidate partial positions, buy, one way position mode
reduce_sell_single:Liquidate partial positions, sell, one way position mode
burst_buy_single:Liquidate short positions, buy, one way postion mode
burst_sell_single:Liquidate partial positions, sell, one way position mode
delivery_sell_single:Delivery sell, one way position mode
delivery_buy_single:Delivery buy, one way position mode
dte_sys_adl_buy_in_single_side_mode:ADL close position, buy, one way position mode
dte_sys_adl_sell_in_single_side_mode:ADL close position, sell, one way position mode
> notionalUsdStringEstimated USD value of orders
> orderTypeStringOrder type
limit: limit order
market: market order
> forceStringOrder validity period
> sideStringOrder direction
> posSideStringPosition direction
long: hedge-mode, long position
short: hedge-mode, short position
net: one-way-mode position
> marginModeStringMargin mode
crossed: crossed mode
isolated: isolated mode
> marginCoinStringMargin coin
> fillPriceStringLatest filled price
> tradeIdStringLatest transaction ID
> baseVolumeStringNumber of latest filled orders
> fillTimeStringLatest transaction time. Unix millisecond timestamp, e.g. 1690196141868
> fillFeeStringTransaction fee of the latest transaction, negative value
> fillFeeCoinStringCurrency of transaction fee of the latest transaction
> tradeScopeStringThe liquidity direction of the latest transaction T: taker M maker
> accBaseVolumeStringTotal filled quantity
> fillNotionalUsdStringUSD value of filled orders
> priceAvgStringAverage filled price
If the filled size is 0, the field is 0; if the order is not filled, the field is also 0; This field will not be pushed if the order is cancelled
> statusStringOrder status
live: New order, waiting for a match in orderbook
partially_filled: Partially filled
filled: All filled
canceled: the order is cancelled
> cancelReasonStringCancel reason
normal_cancel Normal cancel
stp_cancel Cancelled by STP
Detailed enumerations can be obtained on the Enumeration page.
> leverageStringLeverage
> feeDetailList<Object>Transaction fee of the order
>> feeCoinStringThe currency of the transaction fee. The margin is charged.
>> feeStringOrder transaction fee, the transaction fee charged by the platform from the user.
> pnlStringProfit
> uTimeStringOrder update time, Milliseconds format of updated data timestamp Unix, e.g. 1597026383085
> cTimeStringOrder creation time, milliseconds format of Unix timestamp, e.g.1597026383085
> reduceOnlyStringReduce-only
yes: Yes
no: No
> presetStopSurplusPriceStringSet TP price
> presetStopLossPriceStringSet SL price
> 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
> totalProfitsStringTotal profits
> presetStopSurplusPriceStringTake-profit value
> presetStopLossPriceStringStop-loss value
> presetStopSurplusExecutePriceStringPreset stop - profit execution price
> presetStopLossExecutePriceStringPreset stop-loss execution price
History Position ChannelTrigger Order Channel
JSON
JSON
JSON