pub enum DerivativeInfo {
Option {
strike: Decimal,
expiry: NaiveDate,
put_call: PutCall,
underlying_symbol: String,
underlying_conid: Option<String>,
},
Future {
expiry: NaiveDate,
underlying_symbol: String,
underlying_conid: Option<String>,
},
FutureOption {
strike: Decimal,
expiry: NaiveDate,
put_call: PutCall,
underlying_symbol: String,
underlying_conid: Option<String>,
},
Warrant {
strike: Option<Decimal>,
expiry: Option<NaiveDate>,
underlying_symbol: Option<String>,
},
}Expand description
Derivative instrument information
Contains structured information about derivative contracts (options, futures, warrants). This enum consolidates derivative-specific fields based on the instrument type.
Used by: Trade, Position
Variants§
Option
Option contract (equity or index option)
Standard option giving the right (but not obligation) to buy or sell an underlying asset at a specified strike price by the expiration date.
Fields
Future
Future contract
Agreement to buy or sell an asset at a predetermined price on a specified future date.
Fields
FutureOption
Future option (option on a futures contract)
Option where the underlying asset is a futures contract rather than a stock.
Fields
Warrant
Warrant
Long-term option-like security issued by a company, typically with longer expiration periods than standard options.
Trait Implementations§
Source§impl Clone for DerivativeInfo
impl Clone for DerivativeInfo
Source§fn clone(&self) -> DerivativeInfo
fn clone(&self) -> DerivativeInfo
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 DerivativeInfo
impl Debug for DerivativeInfo
Source§impl<'de> Deserialize<'de> for DerivativeInfo
impl<'de> Deserialize<'de> for DerivativeInfo
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 PartialEq for DerivativeInfo
impl PartialEq for DerivativeInfo
Source§impl Serialize for DerivativeInfo
impl Serialize for DerivativeInfo
impl Eq for DerivativeInfo
impl StructuralPartialEq for DerivativeInfo
Auto Trait Implementations§
impl Freeze for DerivativeInfo
impl RefUnwindSafe for DerivativeInfo
impl Send for DerivativeInfo
impl Sync for DerivativeInfo
impl Unpin for DerivativeInfo
impl UnwindSafe for DerivativeInfo
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