pub struct InstrumentSpec {Show 20 fields
pub venue: Venue,
pub product: Product,
pub market_type: MarketType,
pub instrument_id: InstrumentId,
pub canonical_symbol: Box<str>,
pub native_symbol: Box<str>,
pub base: AssetCode,
pub quote: AssetCode,
pub settle: AssetCode,
pub contract_size: Quantity,
pub tick_size: Price,
pub step_size: Quantity,
pub min_qty: Quantity,
pub min_notional: Notional,
pub price_scale: u32,
pub qty_scale: u32,
pub quote_scale: u32,
pub max_leverage: Option<Leverage>,
pub support: InstrumentSupport,
pub status: InstrumentStatus,
}Expand description
Canonical specification used by normalization and validation.
Fields§
§venue: Venue§product: Product§market_type: MarketType§instrument_id: InstrumentId§canonical_symbol: Box<str>§native_symbol: Box<str>§base: AssetCode§quote: AssetCode§settle: AssetCode§contract_size: Quantity§tick_size: Price§step_size: Quantity§min_qty: Quantity§min_notional: Notional§price_scale: u32§qty_scale: u32§quote_scale: u32§max_leverage: Option<Leverage>§support: InstrumentSupport§status: InstrumentStatusImplementations§
Source§impl InstrumentSpec
impl InstrumentSpec
pub fn price_from_fast(&self, value: FastPrice) -> Price
pub fn quantity_from_fast(&self, value: FastQuantity) -> Quantity
pub fn matches_native_symbol(&self, symbol: &str) -> bool
Trait Implementations§
Source§impl Clone for InstrumentSpec
impl Clone for InstrumentSpec
Source§fn clone(&self) -> InstrumentSpec
fn clone(&self) -> InstrumentSpec
Returns a duplicate 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 InstrumentSpec
impl Debug for InstrumentSpec
Source§impl<'de> Deserialize<'de> for InstrumentSpec
impl<'de> Deserialize<'de> for InstrumentSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InstrumentSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InstrumentSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InstrumentSpec
impl PartialEq for InstrumentSpec
Source§impl Serialize for InstrumentSpec
impl Serialize for InstrumentSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for InstrumentSpec
impl StructuralPartialEq for InstrumentSpec
Auto Trait Implementations§
impl Freeze for InstrumentSpec
impl RefUnwindSafe for InstrumentSpec
impl Send for InstrumentSpec
impl Sync for InstrumentSpec
impl Unpin for InstrumentSpec
impl UnsafeUnpin for InstrumentSpec
impl UnwindSafe for InstrumentSpec
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