pub enum OrderAny {
Limit(LimitOrder),
LimitIfTouched(LimitIfTouchedOrder),
Market(MarketOrder),
MarketIfTouched(MarketIfTouchedOrder),
MarketToLimit(MarketToLimitOrder),
StopLimit(StopLimitOrder),
StopMarket(StopMarketOrder),
TrailingStopLimit(TrailingStopLimitOrder),
TrailingStopMarket(TrailingStopMarketOrder),
}
Variants§
Limit(LimitOrder)
LimitIfTouched(LimitIfTouchedOrder)
Market(MarketOrder)
MarketIfTouched(MarketIfTouchedOrder)
MarketToLimit(MarketToLimitOrder)
StopLimit(StopLimitOrder)
StopMarket(StopMarketOrder)
TrailingStopLimit(TrailingStopLimitOrder)
TrailingStopMarket(TrailingStopMarketOrder)
Implementations§
Source§impl OrderAny
impl OrderAny
Sourcepub fn from_events(events: Vec<OrderEventAny>) -> Result<Self>
pub fn from_events(events: Vec<OrderEventAny>) -> Result<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OrderAny
impl<'de> Deserialize<'de> for OrderAny
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LimitIfTouchedOrder> for OrderAny
impl From<LimitIfTouchedOrder> for OrderAny
Source§fn from(v: LimitIfTouchedOrder) -> OrderAny
fn from(v: LimitIfTouchedOrder) -> OrderAny
Converts to this type from the input type.
Source§impl From<LimitOrder> for OrderAny
impl From<LimitOrder> for OrderAny
Source§fn from(v: LimitOrder) -> OrderAny
fn from(v: LimitOrder) -> OrderAny
Converts to this type from the input type.
Source§impl From<LimitOrderAny> for OrderAny
impl From<LimitOrderAny> for OrderAny
Source§fn from(order: LimitOrderAny) -> OrderAny
fn from(order: LimitOrderAny) -> OrderAny
Converts to this type from the input type.
Source§impl From<MarketIfTouchedOrder> for OrderAny
impl From<MarketIfTouchedOrder> for OrderAny
Source§fn from(v: MarketIfTouchedOrder) -> OrderAny
fn from(v: MarketIfTouchedOrder) -> OrderAny
Converts to this type from the input type.
Source§impl From<MarketOrder> for OrderAny
impl From<MarketOrder> for OrderAny
Source§fn from(v: MarketOrder) -> OrderAny
fn from(v: MarketOrder) -> OrderAny
Converts to this type from the input type.
Source§impl From<MarketToLimitOrder> for OrderAny
impl From<MarketToLimitOrder> for OrderAny
Source§fn from(v: MarketToLimitOrder) -> OrderAny
fn from(v: MarketToLimitOrder) -> OrderAny
Converts to this type from the input type.
Source§impl From<OrderAny> for LimitOrderAny
impl From<OrderAny> for LimitOrderAny
Source§fn from(order: OrderAny) -> LimitOrderAny
fn from(order: OrderAny) -> LimitOrderAny
Converts to this type from the input type.
Source§impl From<OrderAny> for OrderSnapshot
impl From<OrderAny> for OrderSnapshot
Source§impl From<OrderAny> for PassiveOrderAny
impl From<OrderAny> for PassiveOrderAny
Source§fn from(order: OrderAny) -> PassiveOrderAny
fn from(order: OrderAny) -> PassiveOrderAny
Converts to this type from the input type.
Source§impl From<OrderAny> for StopOrderAny
impl From<OrderAny> for StopOrderAny
Source§fn from(order: OrderAny) -> StopOrderAny
fn from(order: OrderAny) -> StopOrderAny
Converts to this type from the input type.
Source§impl From<OrderInitialized> for OrderAny
impl From<OrderInitialized> for OrderAny
Source§fn from(order: OrderInitialized) -> Self
fn from(order: OrderInitialized) -> Self
Converts to this type from the input type.
Source§impl From<PassiveOrderAny> for OrderAny
impl From<PassiveOrderAny> for OrderAny
Source§fn from(order: PassiveOrderAny) -> OrderAny
fn from(order: PassiveOrderAny) -> OrderAny
Converts to this type from the input type.
Source§impl From<StopLimitOrder> for OrderAny
impl From<StopLimitOrder> for OrderAny
Source§fn from(v: StopLimitOrder) -> OrderAny
fn from(v: StopLimitOrder) -> OrderAny
Converts to this type from the input type.
Source§impl From<StopMarketOrder> for OrderAny
impl From<StopMarketOrder> for OrderAny
Source§fn from(v: StopMarketOrder) -> OrderAny
fn from(v: StopMarketOrder) -> OrderAny
Converts to this type from the input type.
Source§impl From<StopOrderAny> for OrderAny
impl From<StopOrderAny> for OrderAny
Source§fn from(order: StopOrderAny) -> OrderAny
fn from(order: StopOrderAny) -> OrderAny
Converts to this type from the input type.
Source§impl From<TrailingStopLimitOrder> for OrderAny
impl From<TrailingStopLimitOrder> for OrderAny
Source§fn from(v: TrailingStopLimitOrder) -> OrderAny
fn from(v: TrailingStopLimitOrder) -> OrderAny
Converts to this type from the input type.
Source§impl From<TrailingStopMarketOrder> for OrderAny
impl From<TrailingStopMarketOrder> for OrderAny
Source§fn from(v: TrailingStopMarketOrder) -> OrderAny
fn from(v: TrailingStopMarketOrder) -> OrderAny
Converts to this type from the input type.
Source§impl Order for OrderAny
impl Order for OrderAny
Source§fn apply(
&mut self,
__enum_dispatch_arg_0: OrderEventAny,
) -> Result<(), OrderError>
fn apply( &mut self, __enum_dispatch_arg_0: OrderEventAny, ) -> Result<(), OrderError>
Applies the event
to the order.
§Errors
Returns an error if the event is invalid for the current order status.
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 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 order_side_specified(&self) -> OrderSideSpecified
fn commissions(&self) -> &IndexMap<Currency, Money>
fn update(&mut self, __enum_dispatch_arg_0: &OrderUpdated)
fn events(&self) -> Vec<&OrderEventAny>
fn last_event(&self) -> &OrderEventAny
fn event_count(&self) -> usize
fn venue_order_ids(&self) -> Vec<&VenueOrderId>
fn trade_ids(&self) -> Vec<&TradeId>
fn has_price(&self) -> bool
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
fn is_triggered(&self) -> Option<bool>
fn set_position_id(&mut self, __enum_dispatch_arg_0: Option<PositionId>)
fn set_quantity(&mut self, __enum_dispatch_arg_0: Quantity)
fn set_leaves_qty(&mut self, __enum_dispatch_arg_0: Quantity)
fn set_emulation_trigger(&mut self, __enum_dispatch_arg_0: Option<TriggerType>)
fn set_is_quote_quantity(&mut self, __enum_dispatch_arg_0: bool)
fn set_liquidity_side(&mut self, __enum_dispatch_arg_0: LiquiditySide)
fn would_reduce_only( &self, __enum_dispatch_arg_0: PositionSide, __enum_dispatch_arg_1: Quantity, ) -> bool
fn previous_status(&self) -> Option<OrderStatus>
Source§impl TryInto<LimitIfTouchedOrder> for OrderAny
impl TryInto<LimitIfTouchedOrder> for OrderAny
Source§impl TryInto<LimitOrder> for OrderAny
impl TryInto<LimitOrder> for OrderAny
Source§impl TryInto<MarketIfTouchedOrder> for OrderAny
impl TryInto<MarketIfTouchedOrder> for OrderAny
Source§impl TryInto<MarketOrder> for OrderAny
impl TryInto<MarketOrder> for OrderAny
Source§impl TryInto<MarketToLimitOrder> for OrderAny
impl TryInto<MarketToLimitOrder> for OrderAny
Source§impl TryInto<StopLimitOrder> for OrderAny
impl TryInto<StopLimitOrder> for OrderAny
Source§impl TryInto<StopMarketOrder> for OrderAny
impl TryInto<StopMarketOrder> for OrderAny
Source§impl TryInto<TrailingStopLimitOrder> for OrderAny
impl TryInto<TrailingStopLimitOrder> for OrderAny
Source§impl TryInto<TrailingStopMarketOrder> for OrderAny
impl TryInto<TrailingStopMarketOrder> for OrderAny
impl Eq for OrderAny
Auto Trait Implementations§
impl Freeze for OrderAny
impl RefUnwindSafe for OrderAny
impl Send for OrderAny
impl Sync for OrderAny
impl Unpin for OrderAny
impl UnwindSafe for OrderAny
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Separable for Twhere
T: Display,
impl<T> Separable for Twhere
T: Display,
Source§fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
Adds separators according to the given
SeparatorPolicy
. Read moreSource§fn separate_with_commas(&self) -> String
fn separate_with_commas(&self) -> String
Inserts a comma every three digits from the right. Read more
Source§fn separate_with_spaces(&self) -> String
fn separate_with_spaces(&self) -> String
Inserts a space every three digits from the right. Read more
Source§fn separate_with_dots(&self) -> String
fn separate_with_dots(&self) -> String
Inserts a period every three digits from the right. Read more
Source§fn separate_with_underscores(&self) -> String
fn separate_with_underscores(&self) -> String
Inserts an underscore every three digits from the right. Read more