#[non_exhaustive]pub struct Instrument {
pub inst_type: InstType,
pub inst_id: String,
pub uly: String,
pub inst_family: String,
pub base_ccy: String,
pub quote_ccy: String,
pub settle_ccy: String,
pub lot_sz: NumberString,
pub tick_sz: NumberString,
pub min_sz: NumberString,
pub state: String,
}Expand description
A tradable instrument.
Only commonly used fields are modeled; the struct is #[non_exhaustive] and
unknown JSON fields are ignored, so OKX additions are non-breaking.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.inst_type: InstTypeInstrument type.
inst_id: StringInstrument ID, e.g. BTC-USDT.
uly: StringUnderlying, e.g. BTC-USD (derivatives only).
inst_family: StringInstrument family, e.g. BTC-USD (derivatives only).
base_ccy: StringBase currency, e.g. BTC (spot/margin only).
quote_ccy: StringQuote currency, e.g. USDT (spot/margin only).
settle_ccy: StringSettlement currency (derivatives only).
lot_sz: NumberStringLot size (order size increment).
tick_sz: NumberStringTick size (price increment).
min_sz: NumberStringMinimum order size.
state: StringInstrument lifecycle state, e.g. live, suspend.
Trait Implementations§
Source§impl Clone for Instrument
impl Clone for Instrument
Source§fn clone(&self) -> Instrument
fn clone(&self) -> Instrument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Instrument
impl Debug for Instrument
Source§impl<'de> Deserialize<'de> for Instrument
impl<'de> Deserialize<'de> for Instrument
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
Auto Trait Implementations§
impl Freeze for Instrument
impl RefUnwindSafe for Instrument
impl Send for Instrument
impl Sync for Instrument
impl Unpin for Instrument
impl UnsafeUnpin for Instrument
impl UnwindSafe for Instrument
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