Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
Websocket
Public
Private
    Place Order ChannelCancel Order ChannelModify Order ChannelOrder ChannelFill ChannelFast Fill ChannelBatch Place Order ChannelBatch Cancel Order ChannelBatch Modify Order ChannelAccount ChannelPositions ChannelADL Notification ChannelStrategy Order Channel
Reality
SBE
Private

Order Channel

Description

The following events will trigger a data push:

  1. No Push on first-time subscription
  2. Push when spot/margin/futures orders are placed in the unified trading account
  3. Push when spot/margin/futures orders are filled in the unified trading account
  4. Push when spot/margin/futures orders are cancelled in the unified trading account
Code
{ "op": "subscribe", "args": [ { "instType": "UTA", "topic": "order" } ] }

Request Parameters

ParameterTypeDescription
opStringOperation
subscribe/unsubscribe
argsList<Object>Subscribed channel
> instTypeStringProduct type
UTA Unified trading account
> topicStringTopic
order Order
Code
{ "event": "subscribe", "arg": { "instType": "UTA", "topic": "order" }, "connId": "xxxxxxxxxx" }

Response Parameters

ParametersTypeDescription
eventStringOperation
subscribe Subscribe
unsubscribe Unsubscribe
error Parameter error
argObjectSubscribed channel
> instTypeStringProduct type
UTA Unified Account
> topicStringTopic
order Order channel
codeStringError code
msgStringError message
connIdStringConnection ID
Code
{ "action": "snapshot", "arg": { "instType": "UTA", "topic": "order" }, "data": [ { "category": "usdt-futures", "symbol": "BTCUSDT", "orderId": "xxx", "clientOid": "xxx", "price": "", "qty": "0.001", "amount": "1000", "holdMode": "hedge_mode", "holdSide": "long", "delegateType": "normal", "tradeSide": "open", "orderType": "market", "timeInForce": "gtc", "side": "buy", "marginMode": "crossed", "marginCoin": "USDT", "reduceOnly": "no", "cumExecQty": "0.001", "cumExecValue": "83.1315", "avgPrice": "83131.5", "totalProfit": "0", "orderStatus": "filled", "cancelReason": "", "leverage": "20", "feeDetail": [ { "feeCoin": "USDT", "fee": "0.0332526" } ], "createdTime": "1742367838101", "updatedTime": "1742367838115", "stpMode": "none" } ], "ts": 1742367838124 }

Push Parameters

ParametersTypeDescription
argObjectSubscribed channel
> instTypeStringProduct type
UTA
> topicStringTopic
order
actionStringPush data action
snapshot Full data
dataList<Object>Subscribed data
> categoryStringBusiness line
spot Spot trading
margin Margin trading
usdt-futures USDT Futures
coin-futures Coin-M futures
usdc-futures USDC Futures
> symbolStringSymbol name
> orderIdStringOrder ID
> clientOidStringClient order ID
> priceStringOrder price
> qtyStringOrder quantity
> amountStringOrder amount
> holdModeStringHolding mode
one_way_mode This mode allows holding positions in a single direction, either long or short, but not both at the same time
hedge_mode This mode allows holding both long and short positions simultaneously
> tradeSideStringTrade side
open/close
Detailed enumerations can be obtained on the Enumeration page.
> orderTypeStringOrder type
limit/market
> timeInForceStringTime in force
ioc: Immediate or cancel
fok: Fill or kill
gtc: Good 'till cancelled
post_only: Post (maker) only
rpi: Retail Price Improvement order
> sideStringOrder side
buy/sell
> holdSideStringPosition side
long Long position
short Short position
> delegateTypeStringDelegate type
normal: Limit Order
stop_profit_market: Take Profit Market
stop_loss_market: Stop Loss Market
stop_profit_chase: Take Profit Chase Order
stop_loss_chase: Stop Loss Chase Order
trader_delegate: Lead Trader Order
trader_stop_profit: Lead Trader Take Profit
trader_stop_loss: Lead Trader Stop Loss
follower_delegate: Follower Order
reduce_offset_delegate: Reduce-Only Offset Order
market: Market Order
market_risk: Market Order (Risk Handling)
plan_limit: Limit Conditional Order
plan_market: Market Conditional Order
back_contract: Reverse Position
trader_back_contract: Lead Trader Reverse Position
strategy_grid_positive: Strategy - Long Grid
strategy_grid_reverse: Strategy - Short Grid
strategy_unlimited: Unlimited Strategy
stop_profit_limit: Take Profit Limit
stop_loss_limit: Stop Loss Limit
move_stop_limit: Trailing Stop Limit
move_stop_market: Trailing Stop Market
position_stop_profit_limit: Position Take Profit Limit
position_stop_profit_market: Position Take Profit Market
position_stop_loss_limit: Position Stop Loss Limit
position_stop_loss_market: Position Stop Loss Market
tracking_plan_limit: Trailing Limit Order
tracking_plan_market: Trailing Market Order
delivery_close_long: Long Delivery Close
delivery_close_short: Short Delivery Close
liquidation: Liquidation
strategy_dca_positive: DCA Strategy - Long
strategy_dca_reverse: DCA Strategy - Short
spot_trace_trader_buy: Spot Lead Trader Buy
spot_trace_follower_buy: Spot Follower Buy
spot_trace_trader_sell: Spot Lead Trader Sell
spot_trace_follower_sell: Spot Follower Sell
strategy_oco_limit: Strategy - OCO Limit Order
strategy_oco_trigger: Strategy - OCO Trigger Order
modify_limit_order: Modify Limit Order
strategy_regular_buy: Strategy - Auto-Invest Buy
strategy_grid_middle: Strategy - Neutral Grid
strategy_cta_positive: CTA Strategy - Long
strategy_cta_reverse: CTA Strategy - Short
strategy_tpsl_limit: Spot TP/SL Limit Order
strategy_tpsl_market: Spot TP/SL Market Order
strategy_contract_ai: Futures AI Investment Strategy
strategy_trace_market: Trailing Stop Market Order
strategy_trace_limit: Trailing Stop Limit Order
strategy_portfolio_buy: Strategy - Smart Portfolio Buy
strategy_portfolio_sell: Strategy - Smart Portfolio Sell
strategy_tradingview: TradingView Signal Strategy
sigan_trace: Signal Follower
mmr_stop_loss_market: MMR Stop Loss Market
bbo_opponent1: BBO - Opponent Best Price 1
bbo_opponent5: BBO - Opponent Best Price 5
bbo_companion1: BBO - Companion Best Price 1
bbo_companion5: BBO - Companion Best Price 5
bbo_opponent1_profit: BBO - Opponent 1 Take Profit
bbo_opponent5_profit: BBO - Opponent 5 Take Profit
bbo_companion1_profit: BBO - Companion 1 Take Profit
bbo_companion5_profit: BBO - Companion 5 Take Profit
bbo_opponent1_loss: BBO - Opponent 1 Stop Loss
bbo_opponent5_loss: BBO - Opponent 5 Stop Loss
bbo_companion1_loss: BBO - Companion 1 Stop Loss
bbo_companion5_loss: BBO - Companion 5 Stop Loss
spot_bbo_opponent1_tpsl: Spot BBO - Opponent 1 TP/SL
spot_bbo_opponent5_tpsl: Spot BBO - Opponent 5 TP/SL
spot_bbo_companion1_tpsl: Spot BBO - Companion 1 TP/SL
spot_bbo_companion5_tpsl: Spot BBO - Companion 5 TP/SL
dummy_bbo_profit: BBO - Take Profit
dummy_bbo_loss: BBO - Stop Loss
strategy_pre_tpsl_limit: Spot Preset TP/SL Limit Order
strategy_pre_tpsl_market: Spot Preset TP/SL Market Order
future_signal_delegate: Futures Copy Trading Limit Order
grant_market: Voucher Opening Order
tg_signal_limit: TG Signal Limit Order
tg_signal_tp_market: TG Signal Take Profit Market
tg_signal_sl_market: TG Signal Stop Loss Market
strategy_preset_tpsl_limit: Spot Preset Trigger TP/SL Limit Order
strategy_preset_tpsl_market: Spot Preset Trigger TP/SL Market Order
trader_iceberg_limit: Iceberg Order
trader_time_share_market: TWAP Market Order
strategy_arbitrage_positive: Funding Rate Arbitrage Strategy - Long
strategy_arbitrage_reverse: Funding Rate Arbitrage Strategy - Short
convert_hedging: Convert Hedging
off_close: Delisting Close
> marginModeStringMargin mode
crossed Cross margin
isolated Isolated margin
> reduceOnlyStringReduce-only identifier
yes/no
> marginCoinStringMargin coin
> cumExecQtyStringCumulative executed quantity
> cumExecValueStringCumulative executed value
> avgPriceStringAverage execution price
If not executed, this field will default to 0
> totalProfitStringTotal profit
> orderStatusStringOrder status
new Order matching.
partially_filled Partially filled
filled Fully filled
cancelled Cancelled
> cancelReasonStringReason for order cancellation
> leverageStringLeverage
> feeDetailListFee detail list
>> feeCoinStringFee coin
>> feeStringFee amount
> createdTimeStringCreated time
A Unix timestamp in milliseconds. e.g.,1597026383085
> updatedTimeStringUpdated time
A Unix timestamp in milliseconds. e.g.,1597026383085
> stpModeStringSTP Mode(Self Trade Prevention)
none: no STP settings
cancel_taker: cancel taker order
cancel_maker: cancel maker order
cancel_both: cancel both of taker and maker orders
Modify Order ChannelFill Channel
JSON
JSON
JSON