nautilus_model::orders::base

Trait Order

source
pub trait Order: 'static + Send {
Show 70 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 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<Price>; fn trailing_offset(&self) -> Option<Price>; 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<&HashMap<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_last(&self) -> UnixNanos; 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>; // Provided methods 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 { ... }
}

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 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<Price>

source

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

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<&HashMap<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_last(&self) -> UnixNanos

source

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

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>

Provided Methods§

Trait Implementations§

source§

impl From<OrderAny> for Box<dyn Order>

source§

fn from(order: OrderAny) -> Box<dyn Order>

Converts to this type from the input type.

Implementors§