pub enum InstrumentAny {
BinaryOption(BinaryOption),
CryptoFuture(CryptoFuture),
CryptoPerpetual(CryptoPerpetual),
CurrencyPair(CurrencyPair),
Equity(Equity),
FuturesContract(FuturesContract),
FuturesSpread(FuturesSpread),
OptionsContract(OptionsContract),
OptionsSpread(OptionsSpread),
}
Variants§
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 id(&self) -> InstrumentId
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 instrument_class(&self) -> InstrumentClass
pub fn activation_ns(&self) -> Option<UnixNanos>
pub fn expiration_ns(&self) -> Option<UnixNanos>
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
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)