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 apply(&mut self, event: OrderEventAny) -> Result<(), OrderError>
pub fn apply(&mut self, event: OrderEventAny) -> Result<(), OrderError>
Applies the given event
to the order.
pub fn from_limit(order: LimitOrder) -> Self
pub fn from_limit_if_touched(order: LimitIfTouchedOrder) -> Self
pub fn from_market(order: MarketOrder) -> Self
pub fn from_market_if_touched(order: MarketIfTouchedOrder) -> Self
pub fn from_market_to_limit(order: MarketToLimitOrder) -> Self
pub fn from_stop_limit(order: StopLimitOrder) -> Self
pub fn from_stop_market(order: StopMarketOrder) -> Self
pub fn from_trailing_stop_limit(order: StopLimitOrder) -> Self
pub fn from_trailing_stop_market(order: StopMarketOrder) -> Self
pub fn from_events(events: Vec<OrderEventAny>) -> Result<Self>
pub fn last_event(&self) -> &OrderEventAny
pub fn trader_id(&self) -> TraderId
pub fn strategy_id(&self) -> StrategyId
pub fn instrument_id(&self) -> InstrumentId
pub fn client_order_id(&self) -> ClientOrderId
pub fn account_id(&self) -> Option<AccountId>
pub fn venue_order_id(&self) -> Option<VenueOrderId>
pub fn position_id(&self) -> Option<PositionId>
pub fn exec_algorithm_id(&self) -> Option<ExecAlgorithmId>
pub fn exec_spawn_id(&self) -> Option<ClientOrderId>
pub fn order_side(&self) -> OrderSide
pub fn order_type(&self) -> OrderType
pub fn quantity(&self) -> Quantity
pub fn status(&self) -> OrderStatus
pub fn filled_qty(&self) -> Quantity
pub fn leaves_qty(&self) -> Quantity
pub fn order_side_specified(&self) -> OrderSideSpecified
pub fn liquidity_side(&self) -> Option<LiquiditySide>
pub fn emulation_trigger(&self) -> Option<TriggerType>
pub fn is_open(&self) -> bool
pub fn is_closed(&self) -> bool
pub fn is_inflight(&self) -> bool
pub fn price(&self) -> Option<Price>
pub fn trigger_price(&self) -> Option<Price>
pub fn would_reduce_only( &self, side: PositionSide, position_qty: Quantity, ) -> bool
pub fn is_reduce_only(&self) -> bool
pub fn is_buy(&self) -> bool
pub fn is_sell(&self) -> bool
pub fn parent_order_id(&self) -> Option<ClientOrderId>
pub fn contingency_type(&self) -> Option<ContingencyType>
pub fn linked_order_ids(&self) -> Option<Vec<ClientOrderId>>
Trait Implementations§
Source§impl AsRef<StopMarketOrder> for OrderAny
impl AsRef<StopMarketOrder> for OrderAny
Source§fn as_ref(&self) -> &StopMarketOrder
fn as_ref(&self) -> &StopMarketOrder
Converts this type into a shared reference of the (usually inferred) input type.
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<OrderAny> for LimitIfTouchedOrder
impl From<OrderAny> for LimitIfTouchedOrder
Source§fn from(order: OrderAny) -> LimitIfTouchedOrder
fn from(order: OrderAny) -> LimitIfTouchedOrder
Converts to this type from the input type.
Source§impl From<OrderAny> for LimitOrder
impl From<OrderAny> for LimitOrder
Source§fn from(order: OrderAny) -> LimitOrder
fn from(order: OrderAny) -> LimitOrder
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 MarketIfTouchedOrder
impl From<OrderAny> for MarketIfTouchedOrder
Source§fn from(order: OrderAny) -> MarketIfTouchedOrder
fn from(order: OrderAny) -> MarketIfTouchedOrder
Converts to this type from the input type.
Source§impl From<OrderAny> for MarketOrder
impl From<OrderAny> for MarketOrder
Source§fn from(order: OrderAny) -> MarketOrder
fn from(order: OrderAny) -> MarketOrder
Converts to this type from the input type.
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 StopLimitOrder
impl From<OrderAny> for StopLimitOrder
Source§fn from(order: OrderAny) -> StopLimitOrder
fn from(order: OrderAny) -> StopLimitOrder
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<OrderAny> for TrailingStopLimitOrder
impl From<OrderAny> for TrailingStopLimitOrder
Source§fn from(order: OrderAny) -> TrailingStopLimitOrder
fn from(order: OrderAny) -> TrailingStopLimitOrder
Converts to this type from the input type.
Source§impl From<OrderAny> for TrailingStopMarketOrder
impl From<OrderAny> for TrailingStopMarketOrder
Source§fn from(order: OrderAny) -> TrailingStopMarketOrder
fn from(order: OrderAny) -> TrailingStopMarketOrder
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.
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
Checks if this value is equivalent to the given key. Read more
§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