pub struct Order {Show 45 fields
pub order_id: String,
pub order_link_id: Option<String>,
pub block_trade_id: Option<String>,
pub symbol: String,
pub price: Decimal,
pub qty: Decimal,
pub side: Side,
pub is_leverage: Option<bool>,
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: Decimal,
pub leaves_value: Decimal,
pub cum_exec_qty: Decimal,
pub cum_exec_value: Decimal,
pub cum_exec_fee: Decimal,
pub time_in_force: TimeInForce,
pub order_type: OrderType,
pub stop_order_type: Option<StopOrderType>,
pub order_iv: Option<Decimal>,
pub market_unit: Option<String>,
pub trigger_price: Option<Decimal>,
pub take_profit: Option<Decimal>,
pub stop_loss: Option<Decimal>,
pub tpsl_mode: Option<TpslMode>,
pub oco_trigger_by: Option<OcoTriggerBy>,
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 base_price: 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§
§order_id: StringOrder ID
order_link_id: Option<String>User customized order ID
block_trade_id: Option<String>Paradigm block trade ID
symbol: StringSymbol name
price: DecimalOrder price
qty: DecimalOrder qty
side: SideSide. Buy,Sell
is_leverage: Option<bool>Whether to borrow. Unified spot only. 0: false, 1: true. Classic spot is not supported, always 0
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 UTA: returns “” for those orders without avg price classic account: returns “0” for those orders without avg price, and also for those orders have partially filled but cancelled at the end
leaves_qty: DecimalThe remaining qty not executed. Classic spot is not supported
leaves_value: DecimalThe estimated value not executed. Classic spot is not supported
cum_exec_qty: DecimalCumulative executed order qty
cum_exec_value: DecimalCumulative executed order value. Classic spot is not supported
cum_exec_fee: DecimalCumulative executed trading fee. Classic spot is not supported
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
order_iv: Option<Decimal>Implied volatility
market_unit: Option<String>The unit for qty when create Spot market orders for UTA account. baseCoin, quoteCoin
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 “”
oco_trigger_by: Option<OcoTriggerBy>The trigger type of Spot OCO order.OcoTriggerByUnknown, OcoTriggerByTp, OcoTriggerByBySl. Classic spot is not supported
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
base_price: Option<Decimal>Last price when place the order, Spot has this field only
reduce_only: boolReduce only. true means reduce position size
close_on_trigger: boolClose on trigger. What is a close on trigger order?
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)