pub struct OrderMsg {Show 51 fields
pub category: Category,
pub order_id: String,
pub order_link_id: Option<String>,
pub is_leverage: Option<bool>,
pub block_trade_id: Option<String>,
pub symbol: String,
pub price: Decimal,
pub broker_order_price: Option<Decimal>,
pub qty: Decimal,
pub side: Side,
pub position_idx: PositionIdx,
pub order_status: OrderStatus,
pub create_type: Option<CreateType>,
pub cancel_type: CancelType,
pub reject_reason: RejectReason,
pub avg_price: Option<Decimal>,
pub leaves_qty: Option<Decimal>,
pub leaves_value: Option<Decimal>,
pub cum_exec_qty: Decimal,
pub cum_exec_value: Decimal,
pub cum_exec_fee: Decimal,
pub cum_fee_detail: Option<Value>,
pub closed_pnl: Decimal,
pub fee_currency: Option<Decimal>,
pub time_in_force: TimeInForce,
pub order_type: OrderType,
pub stop_order_type: Option<StopOrderType>,
pub oco_trigger_by: Option<OcoTriggerBy>,
pub order_iv: Option<Decimal>,
pub market_unit: Option<String>,
pub slippage_tolerance_type: Option<SlippageToleranceType>,
pub slippage_tolerance: Option<Decimal>,
pub trigger_price: Option<Decimal>,
pub take_profit: Option<Decimal>,
pub stop_loss: Option<Decimal>,
pub tpsl_mode: Option<TpslMode>,
pub tp_limit_price: Option<Decimal>,
pub sl_limit_price: Option<Decimal>,
pub tp_trigger_by: Option<TriggerBy>,
pub sl_trigger_by: Option<TriggerBy>,
pub trigger_direction: TriggerDirection,
pub trigger_by: Option<TriggerBy>,
pub last_price_on_created: Option<Decimal>,
pub reduce_only: bool,
pub close_on_trigger: bool,
pub place_type: Option<PlaceType>,
pub smp_type: SmpType,
pub smp_group: i64,
pub smp_order_id: Option<String>,
pub created_time: Timestamp,
pub updated_time: Timestamp,
}Fields§
§category: CategoryProduct type UTA2.0, UTA1.0: spot, linear, inverse, option Classic account: spot, linear, inverse.
order_id: StringOrder ID
order_link_id: Option<String>User customized order ID
is_leverage: Option<bool>Whether to borrow. Unified spot only. 0: false, 1: true. Classic spot is not supported, always 0
block_trade_id: Option<String>Block trade ID
symbol: StringSymbol name
price: DecimalOrder price
broker_order_price: Option<Decimal>Dedicated field for EU liquidity provider
qty: DecimalOrder qty
side: SideSide. Buy,Sell
position_idx: PositionIdxPosition index. Used to identify positions in different position modes.
order_status: OrderStatusOrder status
create_type: Option<CreateType>Order create type Only for category=linear or inverse Spot, Option do not have this key
cancel_type: CancelTypeCancel type
reject_reason: RejectReasonReject reason. Classic spot is not supported
avg_price: Option<Decimal>Average filled price returns “” for those orders without avg price, and also for those classic account orders have partilly filled but cancelled at the end Classic Spot: not supported, always “”
leaves_qty: Option<Decimal>The remaining qty not executed. Classic spot is not supported
leaves_value: Option<Decimal>The estimated value not executed. Classic spot is not supported
cum_exec_qty: DecimalCumulative executed order qty
cum_exec_value: DecimalCumulative executed order value.
cum_exec_fee: DecimalCumulative executed trading fee. Classic spot: it is the latest execution fee for order. After upgraded to the Unified account, you can use execFee for each fill in Execution topic
cum_fee_detail: Option<Value>linear, spot: Cumulative trading fee details instead of cumExecFee
closed_pnl: DecimalClosed profit and loss for each close position order. The figure is the same as “closedPnl” from Get Closed PnL
fee_currency: Option<Decimal>Trading fee currency for Spot only. Please understand Spot trading fee currency here
time_in_force: TimeInForceTime in force
order_type: OrderTypeOrder type. Market,Limit. For TP/SL order, it means the order type after triggered
stop_order_type: Option<StopOrderType>Stop order type
oco_trigger_by: Option<OcoTriggerBy>The trigger type of Spot OCO order.OcoTriggerByUnknown, OcoTriggerByTp, OcoTriggerByBySl. Classic spot is not supported
order_iv: Option<Decimal>Implied volatility
market_unit: Option<String>The unit for qty when create Spot market orders for UTA account. baseCoin, quoteCoin
slippage_tolerance_type: Option<SlippageToleranceType>Spot and Futures market order slippage tolerance type TickSize, Percent, UNKNOWN(default)
slippage_tolerance: Option<Decimal>Slippage tolerance value
trigger_price: Option<Decimal>Trigger price. If stopOrderType=TrailingStop, it is activate price. Otherwise, it is trigger price
take_profit: Option<Decimal>Take profit price
stop_loss: Option<Decimal>Stop loss price
tpsl_mode: Option<TpslMode>TP/SL mode, Full: entire position for TP/SL. Partial: partial position tp/sl. Spot does not have this field, and Option returns always “”
tp_limit_price: Option<Decimal>The limit order price when take profit price is triggered
sl_limit_price: Option<Decimal>The limit order price when stop loss price is triggered
tp_trigger_by: Option<TriggerBy>The price type to trigger take profit
sl_trigger_by: Option<TriggerBy>The price type to trigger stop loss
trigger_direction: TriggerDirectionTrigger direction. 1: rise, 2: fall
trigger_by: Option<TriggerBy>The price type of trigger price
last_price_on_created: Option<Decimal>Last price when place the order, Spot is not applicable
reduce_only: boolReduce only. true means reduce position size
close_on_trigger: boolClose on trigger.
place_type: Option<PlaceType>Place type, option used. iv, price
smp_type: SmpTypeSMP execution type
smp_group: i64Smp group ID. If the UID has no group, it is 0 by default
smp_order_id: Option<String>The counterparty’s orderID which triggers this SMP execution
created_time: TimestampOrder created timestamp (ms)
updated_time: TimestampOrder updated timestamp (ms)