pub struct Instrument {Show 22 fields
pub instrument_name: String,
pub price_index: Option<String>,
pub kind: Option<InstrumentKind>,
pub currency: Option<String>,
pub is_active: Option<bool>,
pub expiration_timestamp: Option<i64>,
pub strike: Option<f64>,
pub option_type: Option<OptionType>,
pub tick_size: Option<f64>,
pub min_trade_amount: Option<f64>,
pub contract_size: Option<f64>,
pub settlement_period: Option<String>,
pub instrument_type: Option<InstrumentType>,
pub quote_currency: Option<String>,
pub settlement_currency: Option<String>,
pub creation_timestamp: Option<i64>,
pub max_leverage: Option<f64>,
pub maker_commission: Option<f64>,
pub taker_commission: Option<f64>,
pub instrument_id: Option<u32>,
pub base_currency: Option<String>,
pub counter_currency: Option<String>,
}Expand description
Instrument information
Fields§
§instrument_name: StringInstrument name (e.g., “BTC-PERPETUAL”, “ETH-25JUL25-3000-C”)
price_index: Option<String>Price index used for mark price calculation
kind: Option<InstrumentKind>Instrument kind
currency: Option<String>Base currency
is_active: Option<bool>Whether the instrument is active for trading
expiration_timestamp: Option<i64>Expiration timestamp (None for perpetuals)
strike: Option<f64>Strike price (for options)
option_type: Option<OptionType>Option type (call/put, for options only)
tick_size: Option<f64>Minimum price movement
min_trade_amount: Option<f64>Minimum trade amount
contract_size: Option<f64>Contract size
settlement_period: Option<String>Settlement period
instrument_type: Option<InstrumentType>Instrument type (linear/reversed)
quote_currency: Option<String>Quote currency
settlement_currency: Option<String>Settlement currency
creation_timestamp: Option<i64>Creation timestamp
max_leverage: Option<f64>Maximum leverage
maker_commission: Option<f64>Maker commission rate
taker_commission: Option<f64>Taker commission rate
instrument_id: Option<u32>Unique instrument identifier
base_currency: Option<String>Base currency for the instrument
counter_currency: Option<String>Counter currency for the instrument
Implementations§
Source§impl Instrument
impl Instrument
Sourcepub fn is_perpetual(&self) -> bool
pub fn is_perpetual(&self) -> bool
Check if the instrument is a perpetual contract
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 · 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
Source§impl Display for Instrument
impl Display for Instrument
Auto Trait Implementations§
impl Freeze for Instrument
impl RefUnwindSafe for Instrument
impl Send for Instrument
impl Sync for Instrument
impl Unpin 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