Skip to main content

OptionQuote

Struct OptionQuote 

Source
pub struct OptionQuote {
Show 38 fields pub price: Option<f64>, pub chg: Option<f64>, pub chg_rate: Option<f64>, pub vol: Option<i64>, pub turnover: Option<f64>, pub high: Option<f64>, pub low: Option<f64>, pub mid: Option<f64>, pub open: Option<f64>, pub pre_close: Option<f64>, pub open_interest: Option<i32>, pub premium: Option<f64>, pub iv: Option<f64>, pub delta: Option<f64>, pub gamma: Option<f64>, pub vega: Option<f64>, pub theta: Option<f64>, pub rho: Option<f64>, pub option_type: Option<i32>, pub expire_time: Option<String>, pub strike: Option<f64>, pub contract_size: Option<f64>, pub contract_multiplier: Option<f64>, pub exercise_type: Option<i32>, pub days_to_expiry: Option<i32>, pub net_open_interest: Option<i32>, pub contract_value: Option<f64>, pub equal_underlying: Option<f64>, pub index_option_type: Option<i32>, pub intrinsic_value: Option<f64>, pub time_value: Option<f64>, pub breakeven_point: Vec<f64>, pub dist_to_breakeven: Vec<f64>, pub prob_of_profit: Option<f64>, pub seller_roi: Option<f64>, pub mark_price: Option<f64>, pub leverage_ratio: Option<f64>, pub effective_gearing: Option<f64>,
}

Fields§

§price: Option<f64>

— 基础行情 —

最新价

§chg: Option<f64>

涨跌额

§chg_rate: Option<f64>

涨跌幅(百分比字段,如 20 实际对应 20%)

§vol: Option<i64>

成交量

§turnover: Option<f64>

成交额

§high: Option<f64>

最高价

§low: Option<f64>

最低价

§mid: Option<f64>

中间价(买一与卖一均值)

§open: Option<f64>

今开

§pre_close: Option<f64>

昨收

§open_interest: Option<i32>

— 期权行情衍生数据 —

未平仓合约数

§premium: Option<f64>

溢价(百分比字段,如 20 实际对应 20%)

§iv: Option<f64>

隐含波动率(百分比字段,如 20 实际对应 20%)

§delta: Option<f64>

希腊值 Delta

§gamma: Option<f64>

希腊值 Gamma

§vega: Option<f64>

希腊值 Vega

§theta: Option<f64>

希腊值 Theta

§rho: Option<f64>

希腊值 Rho

§option_type: Option<i32>

— 期权合约静态属性 —

Qot_Common.OptionType,CALL/PUT

§expire_time: Option<String>

到期日

§strike: Option<f64>

行权价

§contract_size: Option<f64>

合约规模

§contract_multiplier: Option<f64>

合约乘数

§exercise_type: Option<i32>

Qot_Common.OptionAreaType,行权类型(美式/欧式/百慕大)

§days_to_expiry: Option<i32>

距到期日天数,负数表示已过期

§net_open_interest: Option<i32>

净未平仓合约数,仅港股期权适用

§contract_value: Option<f64>

合约金额,仅港股期权适用

§equal_underlying: Option<f64>

相当正股手数,仅港股期权适用

§index_option_type: Option<i32>

Qot_Common.IndexOptionType,指数期权类型

§intrinsic_value: Option<f64>

— 期权专有分析数据 —

内在价值

§time_value: Option<f64>

时间价值

§breakeven_point: Vec<f64>

盈亏平衡点列表

§dist_to_breakeven: Vec<f64>

与 breakeven_point 同下标一一对应的距离

§prob_of_profit: Option<f64>

盈利概率

§seller_roi: Option<f64>

卖方回报率(百分比字段)

§mark_price: Option<f64>

标记价

§leverage_ratio: Option<f64>

杠杆倍数

§effective_gearing: Option<f64>

有效杠杆

Implementations§

Source§

impl OptionQuote

Source

pub fn price(&self) -> f64

Returns the value of price, or the default value if price is unset.

Source

pub fn chg(&self) -> f64

Returns the value of chg, or the default value if chg is unset.

Source

pub fn chg_rate(&self) -> f64

Returns the value of chg_rate, or the default value if chg_rate is unset.

Source

pub fn vol(&self) -> i64

Returns the value of vol, or the default value if vol is unset.

Source

pub fn turnover(&self) -> f64

Returns the value of turnover, or the default value if turnover is unset.

Source

pub fn high(&self) -> f64

Returns the value of high, or the default value if high is unset.

Source

pub fn low(&self) -> f64

Returns the value of low, or the default value if low is unset.

Source

pub fn mid(&self) -> f64

Returns the value of mid, or the default value if mid is unset.

Source

pub fn open(&self) -> f64

Returns the value of open, or the default value if open is unset.

Source

pub fn pre_close(&self) -> f64

Returns the value of pre_close, or the default value if pre_close is unset.

Source

pub fn open_interest(&self) -> i32

Returns the value of open_interest, or the default value if open_interest is unset.

Source

pub fn premium(&self) -> f64

Returns the value of premium, or the default value if premium is unset.

Source

pub fn iv(&self) -> f64

Returns the value of iv, or the default value if iv is unset.

Source

pub fn delta(&self) -> f64

Returns the value of delta, or the default value if delta is unset.

Source

pub fn gamma(&self) -> f64

Returns the value of gamma, or the default value if gamma is unset.

Source

pub fn vega(&self) -> f64

Returns the value of vega, or the default value if vega is unset.

Source

pub fn theta(&self) -> f64

Returns the value of theta, or the default value if theta is unset.

Source

pub fn rho(&self) -> f64

Returns the value of rho, or the default value if rho is unset.

Source

pub fn option_type(&self) -> i32

Returns the value of option_type, or the default value if option_type is unset.

Source

pub fn expire_time(&self) -> &str

Returns the value of expire_time, or the default value if expire_time is unset.

Source

pub fn strike(&self) -> f64

Returns the value of strike, or the default value if strike is unset.

Source

pub fn contract_size(&self) -> f64

Returns the value of contract_size, or the default value if contract_size is unset.

Source

pub fn contract_multiplier(&self) -> f64

Returns the value of contract_multiplier, or the default value if contract_multiplier is unset.

Source

pub fn exercise_type(&self) -> i32

Returns the value of exercise_type, or the default value if exercise_type is unset.

Source

pub fn days_to_expiry(&self) -> i32

Returns the value of days_to_expiry, or the default value if days_to_expiry is unset.

Source

pub fn net_open_interest(&self) -> i32

Returns the value of net_open_interest, or the default value if net_open_interest is unset.

Source

pub fn contract_value(&self) -> f64

Returns the value of contract_value, or the default value if contract_value is unset.

Source

pub fn equal_underlying(&self) -> f64

Returns the value of equal_underlying, or the default value if equal_underlying is unset.

Source

pub fn index_option_type(&self) -> i32

Returns the value of index_option_type, or the default value if index_option_type is unset.

Source

pub fn intrinsic_value(&self) -> f64

Returns the value of intrinsic_value, or the default value if intrinsic_value is unset.

Source

pub fn time_value(&self) -> f64

Returns the value of time_value, or the default value if time_value is unset.

Source

pub fn prob_of_profit(&self) -> f64

Returns the value of prob_of_profit, or the default value if prob_of_profit is unset.

Source

pub fn seller_roi(&self) -> f64

Returns the value of seller_roi, or the default value if seller_roi is unset.

Source

pub fn mark_price(&self) -> f64

Returns the value of mark_price, or the default value if mark_price is unset.

Source

pub fn leverage_ratio(&self) -> f64

Returns the value of leverage_ratio, or the default value if leverage_ratio is unset.

Source

pub fn effective_gearing(&self) -> f64

Returns the value of effective_gearing, or the default value if effective_gearing is unset.

Trait Implementations§

Source§

impl Clone for OptionQuote

Source§

fn clone(&self) -> OptionQuote

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 OptionQuote

Source§

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

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

impl Default for OptionQuote

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for OptionQuote

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 Message for OptionQuote

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for OptionQuote

Source§

fn eq(&self, other: &OptionQuote) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for OptionQuote

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
Source§

impl StructuralPartialEq for OptionQuote

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, 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> 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,