Private
Order Channel
Description
The following events will trigger a data push:
- No Push on first-time subscription
- Push when spot/margin/futures orders are placed in the unified trading account
- Push when spot/margin/futures orders are filled in the unified trading account
- Push when spot/margin/futures orders are cancelled in the unified trading account
Code
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| op | String | Operation subscribe/unsubscribe |
| args | List<Object> | Subscribed channel |
| > instType | String | Product type UTA Unified trading account |
| > topic | String | Topic order Order |
Code
Response Parameters
| Parameters | Type | Description |
|---|---|---|
| event | String | Operation subscribe Subscribe unsubscribe Unsubscribe error Parameter error |
| arg | Object | Subscribed channel |
| > instType | String | Product type UTA Unified Account |
| > topic | String | Topic order Order channel |
| code | String | Error code |
| msg | String | Error message |
| connId | String | Connection ID |
Code
Push Parameters
| Parameters | Type | Description |
|---|---|---|
| arg | Object | Subscribed channel |
| > instType | String | Product typeUTA |
| > topic | String | Topicorder |
| action | String | Push data actionsnapshot Full data |
| data | List<Object> | Subscribed data |
| > category | String | Business line spot Spot tradingmargin Margin tradingusdt-futures USDT Futurescoin-futures Coin-M futuresusdc-futures USDC Futures |
| > symbol | String | Symbol name |
| > orderId | String | Order ID |
| > clientOid | String | Client order ID |
| > price | String | Order price |
| > qty | String | Order quantity |
| > amount | String | Order amount |
| > holdMode | String | Holding modeone_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 |
| > tradeSide | String | Trade side open/close Detailed enumerations can be obtained on the Enumeration page. |
| > orderType | String | Order type limit/market |
| > timeInForce | String | Time in force ioc: Immediate or cancelfok: Fill or kill gtc: Good 'till cancelledpost_only: Post (maker) onlyrpi: Retail Price Improvement order |
| > venue | String | Order routing strategyinternalization Route directly to the internal (on-exchange) poollit_market Public market. Prioritizes internal matching; if unavailable internally, routes to the external pool; if still unmatched, rests as a limit orderThis field is only effective for Reality (rtoken) trading pairs |
| > rTokenTimeInForce | String | Order execution strategy for Reality (rtoken) trading pairsgtd Valid for the current session. If placed during US market trading hours (weekdays), the limit order is valid until the end of after-hours trading; if placed on weekends, it is valid until just before the next US market opengtc Valid for 90 daysThis field is only effective for Reality (rtoken) trading pairs |
| > side | String | Order side buy/sell |
| > holdSide | String | Position side long Long positionshort Short position |
| > delegateType | String | Delegate typenormal: Limit Orderstop_profit_market: Take Profit Marketstop_loss_market: Stop Loss Marketstop_profit_chase: Take Profit Chase Orderstop_loss_chase: Stop Loss Chase Ordertrader_delegate: Lead Trader Ordertrader_stop_profit: Lead Trader Take Profittrader_stop_loss: Lead Trader Stop Lossfollower_delegate: Follower Orderreduce_offset_delegate: Reduce-Only Offset Ordermarket: Market Ordermarket_risk: Market Order (Risk Handling)plan_limit: Limit Conditional Orderplan_market: Market Conditional Orderback_contract: Reverse Positiontrader_back_contract: Lead Trader Reverse Positionstrategy_grid_positive: Strategy - Long Gridstrategy_grid_reverse: Strategy - Short Gridstrategy_unlimited: Unlimited Strategystop_profit_limit: Take Profit Limitstop_loss_limit: Stop Loss Limitmove_stop_limit: Trailing Stop Limitmove_stop_market: Trailing Stop Marketposition_stop_profit_limit: Position Take Profit Limitposition_stop_profit_market: Position Take Profit Marketposition_stop_loss_limit: Position Stop Loss Limitposition_stop_loss_market: Position Stop Loss Markettracking_plan_limit: Trailing Limit Ordertracking_plan_market: Trailing Market Orderdelivery_close_long: Long Delivery Closedelivery_close_short: Short Delivery Closeliquidation: Liquidationstrategy_dca_positive: DCA Strategy - Longstrategy_dca_reverse: DCA Strategy - Shortspot_trace_trader_buy: Spot Lead Trader Buyspot_trace_follower_buy: Spot Follower Buyspot_trace_trader_sell: Spot Lead Trader Sellspot_trace_follower_sell: Spot Follower Sellstrategy_oco_limit: Strategy - OCO Limit Orderstrategy_oco_trigger: Strategy - OCO Trigger Ordermodify_limit_order: Modify Limit Orderstrategy_regular_buy: Strategy - Auto-Invest Buystrategy_grid_middle: Strategy - Neutral Gridstrategy_cta_positive: CTA Strategy - Longstrategy_cta_reverse: CTA Strategy - Shortstrategy_tpsl_limit: Spot TP/SL Limit Orderstrategy_tpsl_market: Spot TP/SL Market Orderstrategy_contract_ai: Futures AI Investment Strategystrategy_trace_market: Trailing Stop Market Orderstrategy_trace_limit: Trailing Stop Limit Orderstrategy_portfolio_buy: Strategy - Smart Portfolio Buystrategy_portfolio_sell: Strategy - Smart Portfolio Sellstrategy_tradingview: TradingView Signal Strategysigan_trace: Signal Followermmr_stop_loss_market: MMR Stop Loss Marketbbo_opponent1: BBO - Opponent Best Price 1bbo_opponent5: BBO - Opponent Best Price 5bbo_companion1: BBO - Companion Best Price 1bbo_companion5: BBO - Companion Best Price 5bbo_opponent1_profit: BBO - Opponent 1 Take Profitbbo_opponent5_profit: BBO - Opponent 5 Take Profitbbo_companion1_profit: BBO - Companion 1 Take Profitbbo_companion5_profit: BBO - Companion 5 Take Profitbbo_opponent1_loss: BBO - Opponent 1 Stop Lossbbo_opponent5_loss: BBO - Opponent 5 Stop Lossbbo_companion1_loss: BBO - Companion 1 Stop Lossbbo_companion5_loss: BBO - Companion 5 Stop Lossspot_bbo_opponent1_tpsl: Spot BBO - Opponent 1 TP/SLspot_bbo_opponent5_tpsl: Spot BBO - Opponent 5 TP/SLspot_bbo_companion1_tpsl: Spot BBO - Companion 1 TP/SLspot_bbo_companion5_tpsl: Spot BBO - Companion 5 TP/SLdummy_bbo_profit: BBO - Take Profitdummy_bbo_loss: BBO - Stop Lossstrategy_pre_tpsl_limit: Spot Preset TP/SL Limit Orderstrategy_pre_tpsl_market: Spot Preset TP/SL Market Orderfuture_signal_delegate: Futures Copy Trading Limit Ordergrant_market: Voucher Opening Ordertg_signal_limit: TG Signal Limit Ordertg_signal_tp_market: TG Signal Take Profit Markettg_signal_sl_market: TG Signal Stop Loss Marketstrategy_preset_tpsl_limit: Spot Preset Trigger TP/SL Limit Orderstrategy_preset_tpsl_market: Spot Preset Trigger TP/SL Market Ordertrader_iceberg_limit: Iceberg Ordertrader_time_share_market: TWAP Market Orderstrategy_arbitrage_positive: Funding Rate Arbitrage Strategy - Longstrategy_arbitrage_reverse: Funding Rate Arbitrage Strategy - Short convert_hedging: Convert Hedgingoff_close: Delisting Close |
| > marginMode | String | Margin mode crossed Cross margin isolated Isolated margin |
| > reduceOnly | String | Reduce-only identifieryes/no |
| > marginCoin | String | Margin coin |
| > cumExecQty | String | Cumulative executed quantity |
| > cumExecValue | String | Cumulative executed value |
| > avgPrice | String | Average execution price If not executed, this field will default to 0 |
| > totalProfit | String | Total profit |
| > orderStatus | String | Order statusnew Order matching. partially_filled Partially filledfilled Fully filledcancelled Cancelled |
| > cancelReason | String | Reason for order cancellation |
| > leverage | String | Leverage |
| > feeDetail | List | Fee detail list |
| >> feeCoin | String | Fee coin |
| >> fee | String | Fee amount |
| > createdTime | String | Created time Generated by OMS A Unix timestamp in milliseconds. e.g., 1597026383085 |
| > updatedTime | String | Updated time Generated by the matching engine A Unix timestamp in milliseconds. e.g., 1597026383085 |
| > stpMode | String | STP Mode(Self Trade Prevention)none: no STP settingscancel_taker: cancel taker order cancel_maker: cancel maker order cancel_both: cancel both of taker and maker orders |
| > requestId | Number | Custom request ID used to identify the order modification request Only supports numbers within 18 digits Returned when autoCancel=yes and the modify order request is rejected |
