Trait Order

Source
pub trait Order: 'static + Send {
Show 86 methods // Required methods fn into_any(self) -> OrderAny; fn status(&self) -> OrderStatus; fn trader_id(&self) -> TraderId; fn strategy_id(&self) -> StrategyId; fn instrument_id(&self) -> InstrumentId; fn symbol(&self) -> Symbol; fn venue(&self) -> Venue; fn client_order_id(&self) -> ClientOrderId; fn venue_order_id(&self) -> Option<VenueOrderId>; fn position_id(&self) -> Option<PositionId>; fn account_id(&self) -> Option<AccountId>; fn last_trade_id(&self) -> Option<TradeId>; fn order_side(&self) -> OrderSide; fn order_type(&self) -> OrderType; fn quantity(&self) -> Quantity; fn time_in_force(&self) -> TimeInForce; fn expire_time(&self) -> Option<UnixNanos>; fn price(&self) -> Option<Price>; fn trigger_price(&self) -> Option<Price>; fn trigger_type(&self) -> Option<TriggerType>; fn liquidity_side(&self) -> Option<LiquiditySide>; fn is_post_only(&self) -> bool; fn is_reduce_only(&self) -> bool; fn is_quote_quantity(&self) -> bool; fn display_qty(&self) -> Option<Quantity>; fn limit_offset(&self) -> Option<Decimal>; fn trailing_offset(&self) -> Option<Decimal>; fn trailing_offset_type(&self) -> Option<TrailingOffsetType>; fn emulation_trigger(&self) -> Option<TriggerType>; fn trigger_instrument_id(&self) -> Option<InstrumentId>; fn contingency_type(&self) -> Option<ContingencyType>; fn order_list_id(&self) -> Option<OrderListId>; fn linked_order_ids(&self) -> Option<&[ClientOrderId]>; fn parent_order_id(&self) -> Option<ClientOrderId>; fn exec_algorithm_id(&self) -> Option<ExecAlgorithmId>; fn exec_algorithm_params(&self) -> Option<&IndexMap<Ustr, Ustr>>; fn exec_spawn_id(&self) -> Option<ClientOrderId>; fn tags(&self) -> Option<&[Ustr]>; fn filled_qty(&self) -> Quantity; fn leaves_qty(&self) -> Quantity; fn avg_px(&self) -> Option<f64>; fn slippage(&self) -> Option<f64>; fn init_id(&self) -> UUID4; fn ts_init(&self) -> UnixNanos; fn ts_submitted(&self) -> Option<UnixNanos>; fn ts_accepted(&self) -> Option<UnixNanos>; fn ts_closed(&self) -> Option<UnixNanos>; fn ts_last(&self) -> UnixNanos; fn commissions(&self) -> &IndexMap<Currency, Money>; fn apply(&mut self, event: OrderEventAny) -> Result<(), OrderError>; fn update(&mut self, event: &OrderUpdated); fn events(&self) -> Vec<&OrderEventAny>; fn venue_order_ids(&self) -> Vec<&VenueOrderId>; fn trade_ids(&self) -> Vec<&TradeId>; fn has_price(&self) -> bool; fn is_triggered(&self) -> Option<bool>; fn set_position_id(&mut self, position_id: Option<PositionId>); fn set_quantity(&mut self, quantity: Quantity); fn set_leaves_qty(&mut self, leaves_qty: Quantity); fn set_emulation_trigger(&mut self, emulation_trigger: Option<TriggerType>); fn set_is_quote_quantity(&mut self, is_quote_quantity: bool); fn set_liquidity_side(&mut self, liquidity_side: LiquiditySide); fn would_reduce_only( &self, side: PositionSide, position_qty: Quantity, ) -> bool; fn previous_status(&self) -> Option<OrderStatus>; // Provided methods fn order_side_specified(&self) -> OrderSideSpecified { ... } fn last_event(&self) -> &OrderEventAny { ... } fn event_count(&self) -> usize { ... } fn is_buy(&self) -> bool { ... } fn is_sell(&self) -> bool { ... } fn is_passive(&self) -> bool { ... } fn is_aggressive(&self) -> bool { ... } fn is_emulated(&self) -> bool { ... } fn is_active_local(&self) -> bool { ... } fn is_primary(&self) -> bool { ... } fn is_secondary(&self) -> bool { ... } fn is_contingency(&self) -> bool { ... } fn is_parent_order(&self) -> bool { ... } fn is_child_order(&self) -> bool { ... } fn is_open(&self) -> bool { ... } fn is_canceled(&self) -> bool { ... } fn is_closed(&self) -> bool { ... } fn is_inflight(&self) -> bool { ... } fn is_pending_update(&self) -> bool { ... } fn is_pending_cancel(&self) -> bool { ... } fn is_spawned(&self) -> bool { ... } fn to_own_book_order(&self) -> OwnBookOrder { ... }
}

Required Methods§

Source

fn into_any(self) -> OrderAny

Source

fn status(&self) -> OrderStatus

Source

fn trader_id(&self) -> TraderId

Source

fn strategy_id(&self) -> StrategyId

Source

fn instrument_id(&self) -> InstrumentId

Source

fn symbol(&self) -> Symbol

Source

fn venue(&self) -> Venue

Source

fn client_order_id(&self) -> ClientOrderId

Source

fn venue_order_id(&self) -> Option<VenueOrderId>

Source

fn position_id(&self) -> Option<PositionId>

Source

fn account_id(&self) -> Option<AccountId>

Source

fn last_trade_id(&self) -> Option<TradeId>

Source

fn order_side(&self) -> OrderSide

Source

fn order_type(&self) -> OrderType

Source

fn quantity(&self) -> Quantity

Source

fn time_in_force(&self) -> TimeInForce

Source

fn expire_time(&self) -> Option<UnixNanos>

Source

fn price(&self) -> Option<Price>

Source

fn trigger_price(&self) -> Option<Price>

Source

fn trigger_type(&self) -> Option<TriggerType>

Source

fn liquidity_side(&self) -> Option<LiquiditySide>

Source

fn is_post_only(&self) -> bool

Source

fn is_reduce_only(&self) -> bool

Source

fn is_quote_quantity(&self) -> bool

Source

fn display_qty(&self) -> Option<Quantity>

Source

fn limit_offset(&self) -> Option<Decimal>

Source

fn trailing_offset(&self) -> Option<Decimal>

Source

fn trailing_offset_type(&self) -> Option<TrailingOffsetType>

Source

fn emulation_trigger(&self) -> Option<TriggerType>

Source

fn trigger_instrument_id(&self) -> Option<InstrumentId>

Source

fn contingency_type(&self) -> Option<ContingencyType>

Source

fn order_list_id(&self) -> Option<OrderListId>

Source

fn linked_order_ids(&self) -> Option<&[ClientOrderId]>

Source

fn parent_order_id(&self) -> Option<ClientOrderId>

Source

fn exec_algorithm_id(&self) -> Option<ExecAlgorithmId>

Source

fn exec_algorithm_params(&self) -> Option<&IndexMap<Ustr, Ustr>>

Source

fn exec_spawn_id(&self) -> Option<ClientOrderId>

Source

fn tags(&self) -> Option<&[Ustr]>

Source

fn filled_qty(&self) -> Quantity

Source

fn leaves_qty(&self) -> Quantity

Source

fn avg_px(&self) -> Option<f64>

Source

fn slippage(&self) -> Option<f64>

Source

fn init_id(&self) -> UUID4

Source

fn ts_init(&self) -> UnixNanos

Source

fn ts_submitted(&self) -> Option<UnixNanos>

Source

fn ts_accepted(&self) -> Option<UnixNanos>

Source

fn ts_closed(&self) -> Option<UnixNanos>

Source

fn ts_last(&self) -> UnixNanos

Source

fn commissions(&self) -> &IndexMap<Currency, Money>

Source

fn apply(&mut self, event: OrderEventAny) -> Result<(), OrderError>

Applies the event to the order.

§Errors

Returns an error if the event is invalid for the current order status.

Source

fn update(&mut self, event: &OrderUpdated)

Source

fn events(&self) -> Vec<&OrderEventAny>

Source

fn venue_order_ids(&self) -> Vec<&VenueOrderId>

Source

fn trade_ids(&self) -> Vec<&TradeId>

Source

fn has_price(&self) -> bool

Source

fn is_triggered(&self) -> Option<bool>

Source

fn set_position_id(&mut self, position_id: Option<PositionId>)

Source

fn set_quantity(&mut self, quantity: Quantity)

Source

fn set_leaves_qty(&mut self, leaves_qty: Quantity)

Source

fn set_emulation_trigger(&mut self, emulation_trigger: Option<TriggerType>)

Source

fn set_is_quote_quantity(&mut self, is_quote_quantity: bool)

Source

fn set_liquidity_side(&mut self, liquidity_side: LiquiditySide)

Source

fn would_reduce_only(&self, side: PositionSide, position_qty: Quantity) -> bool

Source

fn previous_status(&self) -> Option<OrderStatus>

Provided Methods§

Implementors§