pub enum InstrumentAny {
Betting(BettingInstrument),
BinaryOption(BinaryOption),
CryptoFuture(CryptoFuture),
CryptoPerpetual(CryptoPerpetual),
CurrencyPair(CurrencyPair),
Equity(Equity),
FuturesContract(FuturesContract),
FuturesSpread(FuturesSpread),
OptionsContract(OptionsContract),
OptionsSpread(OptionsSpread),
}
Variants§
Betting(BettingInstrument)
BinaryOption(BinaryOption)
CryptoFuture(CryptoFuture)
CryptoPerpetual(CryptoPerpetual)
CurrencyPair(CurrencyPair)
Equity(Equity)
FuturesContract(FuturesContract)
FuturesSpread(FuturesSpread)
OptionsContract(OptionsContract)
OptionsSpread(OptionsSpread)
Implementations§
Source§impl InstrumentAny
impl InstrumentAny
Sourcepub fn into_instrument(self) -> Box<dyn Instrument>
pub fn into_instrument(self) -> Box<dyn Instrument>
Consumes the OrderAny
enum and returns the underlying order as a boxed trait.
pub fn instrument_class(&self) -> InstrumentClass
pub fn id(&self) -> InstrumentId
pub fn symbol(&self) -> Symbol
pub fn venue(&self) -> Venue
pub fn raw_symbol(&self) -> Symbol
pub fn underlying(&self) -> Option<&Ustr>
pub fn base_currency(&self) -> Option<Currency>
pub fn quote_currency(&self) -> Currency
pub fn settlement_currency(&self) -> Currency
pub fn is_inverse(&self) -> bool
pub fn price_precision(&self) -> u8
pub fn size_precision(&self) -> u8
pub fn price_increment(&self) -> Price
pub fn size_increment(&self) -> Quantity
pub fn multiplier(&self) -> Quantity
pub fn activation_ns(&self) -> Option<UnixNanos>
pub fn expiration_ns(&self) -> Option<UnixNanos>
pub fn max_quantity(&self) -> Option<Quantity>
pub fn min_quantity(&self) -> Option<Quantity>
pub fn max_notional(&self) -> Option<Money>
pub fn min_notional(&self) -> Option<Money>
pub fn make_price(&self, value: f64) -> Price
pub fn make_qty(&self, value: f64) -> Quantity
pub fn calculate_notional_value( &self, quantity: Quantity, price: Price, use_quote_for_inverse: Option<bool>, ) -> Money
pub fn maker_fee(&self) -> Decimal
pub fn taker_fee(&self) -> Decimal
pub fn get_base_quantity(&self, quantity: Quantity, last_px: Price) -> Quantity
Trait Implementations§
Source§impl Clone for InstrumentAny
impl Clone for InstrumentAny
Source§fn clone(&self) -> InstrumentAny
fn clone(&self) -> InstrumentAny
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InstrumentAny
impl Debug for InstrumentAny
Source§impl PartialEq for InstrumentAny
impl PartialEq for InstrumentAny
Auto Trait Implementations§
impl Freeze for InstrumentAny
impl RefUnwindSafe for InstrumentAny
impl Send for InstrumentAny
impl Sync for InstrumentAny
impl Unpin for InstrumentAny
impl UnwindSafe for InstrumentAny
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