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>— 期权行情衍生数据 —
未平仓合约数
溢价(百分比字段,如 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
impl OptionQuote
Sourcepub fn chg_rate(&self) -> f64
pub fn chg_rate(&self) -> f64
Returns the value of chg_rate, or the default value if chg_rate is unset.
Sourcepub fn turnover(&self) -> f64
pub fn turnover(&self) -> f64
Returns the value of turnover, or the default value if turnover is unset.
Sourcepub fn pre_close(&self) -> f64
pub fn pre_close(&self) -> f64
Returns the value of pre_close, or the default value if pre_close is unset.
Sourcepub fn open_interest(&self) -> i32
pub fn open_interest(&self) -> i32
Returns the value of open_interest, or the default value if open_interest is unset.
Returns the value of premium, or the default value if premium is unset.
Sourcepub fn option_type(&self) -> i32
pub fn option_type(&self) -> i32
Returns the value of option_type, or the default value if option_type is unset.
Sourcepub fn expire_time(&self) -> &str
pub fn expire_time(&self) -> &str
Returns the value of expire_time, or the default value if expire_time is unset.
Sourcepub fn strike(&self) -> f64
pub fn strike(&self) -> f64
Returns the value of strike, or the default value if strike is unset.
Sourcepub fn contract_size(&self) -> f64
pub fn contract_size(&self) -> f64
Returns the value of contract_size, or the default value if contract_size is unset.
Sourcepub fn contract_multiplier(&self) -> f64
pub fn contract_multiplier(&self) -> f64
Returns the value of contract_multiplier, or the default value if contract_multiplier is unset.
Sourcepub fn exercise_type(&self) -> i32
pub fn exercise_type(&self) -> i32
Returns the value of exercise_type, or the default value if exercise_type is unset.
Sourcepub fn days_to_expiry(&self) -> i32
pub fn days_to_expiry(&self) -> i32
Returns the value of days_to_expiry, or the default value if days_to_expiry is unset.
Sourcepub fn net_open_interest(&self) -> i32
pub fn net_open_interest(&self) -> i32
Returns the value of net_open_interest, or the default value if net_open_interest is unset.
Sourcepub fn contract_value(&self) -> f64
pub fn contract_value(&self) -> f64
Returns the value of contract_value, or the default value if contract_value is unset.
Sourcepub fn equal_underlying(&self) -> f64
pub fn equal_underlying(&self) -> f64
Returns the value of equal_underlying, or the default value if equal_underlying is unset.
Sourcepub fn index_option_type(&self) -> i32
pub fn index_option_type(&self) -> i32
Returns the value of index_option_type, or the default value if index_option_type is unset.
Sourcepub fn intrinsic_value(&self) -> f64
pub fn intrinsic_value(&self) -> f64
Returns the value of intrinsic_value, or the default value if intrinsic_value is unset.
Sourcepub fn time_value(&self) -> f64
pub fn time_value(&self) -> f64
Returns the value of time_value, or the default value if time_value is unset.
Sourcepub fn prob_of_profit(&self) -> f64
pub fn prob_of_profit(&self) -> f64
Returns the value of prob_of_profit, or the default value if prob_of_profit is unset.
Sourcepub fn seller_roi(&self) -> f64
pub fn seller_roi(&self) -> f64
Returns the value of seller_roi, or the default value if seller_roi is unset.
Sourcepub fn mark_price(&self) -> f64
pub fn mark_price(&self) -> f64
Returns the value of mark_price, or the default value if mark_price is unset.
Sourcepub fn leverage_ratio(&self) -> f64
pub fn leverage_ratio(&self) -> f64
Returns the value of leverage_ratio, or the default value if leverage_ratio is unset.
Sourcepub fn effective_gearing(&self) -> f64
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
impl Clone for OptionQuote
Source§fn clone(&self) -> OptionQuote
fn clone(&self) -> OptionQuote
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OptionQuote
impl Debug for OptionQuote
Source§impl Default for OptionQuote
impl Default for OptionQuote
Source§impl<'de> Deserialize<'de> for OptionQuotewhere
OptionQuote: Default,
impl<'de> Deserialize<'de> for OptionQuotewhere
OptionQuote: Default,
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>,
Source§impl Message for OptionQuote
impl Message for OptionQuote
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.