Struct SecurityInfo

Source
pub struct SecurityInfo {
Show 22 fields pub symbol: String, pub security_desc: Option<String>, pub security_type: Option<SecurityType>, pub put_or_call: Option<PutOrCall>, pub strike_price: Option<f64>, pub strike_currency: Option<String>, pub currency: Option<String>, pub price_quote_currency: Option<String>, pub instrument_price_precision: Option<i32>, pub min_price_increment: Option<f64>, pub underlying_symbol: Option<String>, pub issue_date: Option<DateTime<Utc>>, pub maturity_date: Option<DateTime<Utc>>, pub maturity_time: Option<DateTime<Utc>>, pub min_trade_vol: Option<f64>, pub settl_type: Option<String>, pub settl_currency: Option<String>, pub comm_currency: Option<String>, pub contract_multiplier: Option<f64>, pub security_alt_ids: Vec<SecurityAltId>, pub tick_rules: Vec<TickRule>, pub security_status: Option<SecurityStatus>,
}
Expand description

Security information in Security List response

Fields§

§symbol: String

Symbol name (Tag 55)

§security_desc: Option<String>

Security description (Tag 107)

§security_type: Option<SecurityType>

Security type (Tag 167)

§put_or_call: Option<PutOrCall>

Put or Call indicator (Tag 201) - Options only

§strike_price: Option<f64>

Strike price (Tag 202) - Options only

§strike_currency: Option<String>

Strike currency (Tag 947)

§currency: Option<String>

Currency (Tag 15)

§price_quote_currency: Option<String>

Price quote currency (Tag 1524)

§instrument_price_precision: Option<i32>

Instrument price precision (Tag 2576)

§min_price_increment: Option<f64>

Minimum price increment (Tag 969)

§underlying_symbol: Option<String>

Underlying symbol (Tag 311) - Options only

§issue_date: Option<DateTime<Utc>>

Issue date (Tag 225)

§maturity_date: Option<DateTime<Utc>>

Maturity date (Tag 541)

§maturity_time: Option<DateTime<Utc>>

Maturity time (Tag 1079)

§min_trade_vol: Option<f64>

Minimum trade volume (Tag 562)

§settl_type: Option<String>

Settlement type (Tag 63)

§settl_currency: Option<String>

Settlement currency (Tag 120)

§comm_currency: Option<String>

Commission currency (Tag 479)

§contract_multiplier: Option<f64>

Contract multiplier (Tag 231)

§security_alt_ids: Vec<SecurityAltId>

Alternative security identifiers (Tag 454)

§tick_rules: Vec<TickRule>

Price increment rules (Tag 1205)

§security_status: Option<SecurityStatus>

Security status (Tag 965) - Present in notifications

Implementations§

Source§

impl SecurityInfo

Source

pub fn new(symbol: String) -> Self

Create a new security info with minimal required fields

Source

pub fn is_option(&self) -> bool

Check if this is an option

Source

pub fn is_future(&self) -> bool

Check if this is a future

Source

pub fn is_spot(&self) -> bool

Check if this is a spot instrument

Source

pub fn with_security_desc(self, desc: String) -> Self

Set security description

Source

pub fn with_security_type(self, security_type: SecurityType) -> Self

Set security type

Source

pub fn with_put_or_call(self, put_or_call: PutOrCall) -> Self

Set put or call for options

Source

pub fn with_strike_price(self, strike_price: f64) -> Self

Set strike price for options

Source

pub fn with_strike_currency(self, strike_currency: String) -> Self

Set strike currency

Source

pub fn with_currency(self, currency: String) -> Self

Set currency

Source

pub fn with_price_quote_currency(self, currency: String) -> Self

Set price quote currency

Source

pub fn with_instrument_price_precision(self, precision: i32) -> Self

Set instrument price precision

Source

pub fn with_min_price_increment(self, increment: f64) -> Self

Set minimum price increment

Source

pub fn with_underlying_symbol(self, underlying: String) -> Self

Set underlying symbol for options

Source

pub fn with_issue_date(self, issue_date: DateTime<Utc>) -> Self

Set issue date

Source

pub fn with_maturity_date(self, maturity_date: DateTime<Utc>) -> Self

Set maturity date

Source

pub fn with_maturity_time(self, maturity_time: DateTime<Utc>) -> Self

Set maturity time

Source

pub fn with_min_trade_vol(self, min_vol: f64) -> Self

Set minimum trade volume

Source

pub fn with_settl_type(self, settl_type: String) -> Self

Set settlement type

Source

pub fn with_settl_currency(self, currency: String) -> Self

Set settlement currency

Source

pub fn with_comm_currency(self, currency: String) -> Self

Set commission currency

Source

pub fn with_contract_multiplier(self, multiplier: f64) -> Self

Set contract multiplier

Source

pub fn add_security_alt_id(self, alt_id: SecurityAltId) -> Self

Add a security alternative ID

Source

pub fn add_tick_rule(self, tick_rule: TickRule) -> Self

Add a tick rule

Source

pub fn with_security_status(self, status: SecurityStatus) -> Self

Set security status

Trait Implementations§

Source§

impl Clone for SecurityInfo

Source§

fn clone(&self) -> SecurityInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SecurityInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SecurityInfo

Source§

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 Serialize for SecurityInfo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,