Skip to main content

OptionsTicker

Struct OptionsTicker 

Source
pub struct OptionsTicker {
Show 25 fields pub symbol: String, pub bid1_price: String, pub bid1_size: String, pub bid1_iv: String, pub ask1_price: String, pub ask1_size: String, pub ask1_iv: String, pub last_price: String, pub high_price_24h: String, pub low_price_24h: String, pub mark_price: String, pub index_price: String, pub mark_iv: String, pub underlying_price: String, pub open_interest: String, pub turnover_24h: String, pub volume_24h: String, pub total_volume: String, pub total_turnover: String, pub delta: String, pub gamma: String, pub vega: String, pub theta: String, pub predicted_delivery_price: String, pub change_24h: String,
}
Expand description

Ticker data for options contracts.

Contains market data for options contracts, including Greeks (delta, gamma, vega, theta), implied volatility, and other options-specific metrics.

Fields§

§symbol: String

Symbol name.

§bid1_price: String

Best bid price.

§bid1_size: String

Best bid size.

§bid1_iv: String

Best bid implied volatility.

§ask1_price: String

Best ask price.

§ask1_size: String

Best ask size.

§ask1_iv: String

Best ask implied volatility.

§last_price: String

Last traded price.

§high_price_24h: String

The highest price in the last 24 hours.

§low_price_24h: String

The lowest price in the last 24 hours.

§mark_price: String

Mark price.

§index_price: String

Index price.

§mark_iv: String

Mark price implied volatility.

§underlying_price: String

Underlying asset price.

§open_interest: String

Open interest size.

§turnover_24h: String

Turnover for 24h.

§volume_24h: String

Volume for 24h.

§total_volume: String

Total volume.

§total_turnover: String

Total turnover.

§delta: String

Delta - rate of change of option price with respect to underlying price.

§gamma: String

Gamma - rate of change of delta with respect to underlying price.

§vega: String

Vega - rate of change of option price with respect to implied volatility.

§theta: String

Theta - rate of change of option price with respect to time.

§predicted_delivery_price: String

Predicted delivery price. It has a value 30 mins before delivery.

§change_24h: String

The change in the last 24 hours.

Implementations§

Source§

impl OptionsTicker

Source

pub fn new(symbol: String) -> Self

Creates a new OptionsTicker with default values.

Source

pub fn bid1_price_f64(&self) -> Option<f64>

Returns the best bid price as a floating-point number, if parseable.

Source

pub fn ask1_price_f64(&self) -> Option<f64>

Returns the best ask price as a floating-point number, if parseable.

Source

pub fn last_price_f64(&self) -> Option<f64>

Returns the last price as a floating-point number, if parseable.

Source

pub fn mark_price_f64(&self) -> Option<f64>

Returns the mark price as a floating-point number, if parseable.

Source

pub fn index_price_f64(&self) -> Option<f64>

Returns the index price as a floating-point number, if parseable.

Source

pub fn underlying_price_f64(&self) -> Option<f64>

Returns the underlying price as a floating-point number, if parseable.

Source

pub fn spread(&self) -> Option<f64>

Returns the bid-ask spread.

Source

pub fn mid_price(&self) -> Option<f64>

Returns the mid price (average of bid and ask).

Source

pub fn change_24h_f64(&self) -> Option<f64>

Returns the 24-hour change as a floating-point number, if parseable.

Source

pub fn high_price_24h_f64(&self) -> Option<f64>

Returns the 24-hour high price as a floating-point number, if parseable.

Source

pub fn low_price_24h_f64(&self) -> Option<f64>

Returns the 24-hour low price as a floating-point number, if parseable.

Source

pub fn open_interest_f64(&self) -> Option<f64>

Returns the open interest as a floating-point number, if parseable.

Source

pub fn volume_24h_f64(&self) -> Option<f64>

Returns the 24-hour volume as a floating-point number, if parseable.

Source

pub fn turnover_24h_f64(&self) -> Option<f64>

Returns the 24-hour turnover as a floating-point number, if parseable.

Source

pub fn total_volume_f64(&self) -> Option<f64>

Returns the total volume as a floating-point number, if parseable.

Source

pub fn total_turnover_f64(&self) -> Option<f64>

Returns the total turnover as a floating-point number, if parseable.

Source

pub fn delta_f64(&self) -> Option<f64>

Returns the delta as a floating-point number, if parseable.

Source

pub fn gamma_f64(&self) -> Option<f64>

Returns the gamma as a floating-point number, if parseable.

Source

pub fn vega_f64(&self) -> Option<f64>

Returns the vega as a floating-point number, if parseable.

Source

pub fn theta_f64(&self) -> Option<f64>

Returns the theta as a floating-point number, if parseable.

Source

pub fn bid1_iv_f64(&self) -> Option<f64>

Returns the bid implied volatility as a floating-point number, if parseable.

Source

pub fn ask1_iv_f64(&self) -> Option<f64>

Returns the ask implied volatility as a floating-point number, if parseable.

Source

pub fn mark_iv_f64(&self) -> Option<f64>

Returns the mark implied volatility as a floating-point number, if parseable.

Source

pub fn predicted_delivery_price_f64(&self) -> Option<f64>

Returns the predicted delivery price as a floating-point number, if parseable.

Source

pub fn bid1_size_f64(&self) -> Option<f64>

Returns the bid size as a floating-point number, if parseable.

Source

pub fn ask1_size_f64(&self) -> Option<f64>

Returns the ask size as a floating-point number, if parseable.

Source

pub fn bid_ask_size_ratio(&self) -> Option<f64>

Returns the bid-ask size ratio.

Source

pub fn total_size(&self) -> Option<f64>

Returns the total size (bid + ask).

Source

pub fn iv_spread(&self) -> Option<f64>

Returns the implied volatility spread (ask IV - bid IV).

Source

pub fn mid_iv(&self) -> Option<f64>

Returns the mid implied volatility (average of bid and ask IV).

Trait Implementations§

Source§

impl Clone for OptionsTicker

Source§

fn clone(&self) -> OptionsTicker

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 OptionsTicker

Source§

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

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

impl<'de> Deserialize<'de> for OptionsTicker

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 OptionsTicker

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> 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>,