pub struct Option {Show 15 fields
pub price_strike: Option<i64>,
pub contract_size: Option<i64>,
pub open_interest: Option<i64>,
pub open_interest_previous_trade_day: Option<i64>,
pub premium: Option<i64>,
pub implied_volatility: Option<i64>,
pub greek: Option<OptionGreek>,
pub open_interest_net: Option<i64>,
pub distance_due_date: Option<i64>,
pub contract_nominal_ammount: Option<u64>,
pub positive_number_of_hand: Option<i64>,
pub option_type: Option<i32>,
pub multiplier: Option<u32>,
pub hp_contract_size: Option<u64>,
pub hp_multiplier: Option<u64>,
}Expand description
期权类型(同时表示美股期权和港股期权)
Fields§
§price_strike: Option<i64>行权价
contract_size: Option<i64>每份合约数(股)
open_interest: Option<i64>未平仓合约数(张)
open_interest_previous_trade_day: Option<i64>前一交易日未平仓合约数(张)
溢价[放大10^5倍],前端展示百分比
implied_volatility: Option<i64>隐含波动率 [放大10^5倍]。前端显示示例:协议值是12345,前端展示为12.345% 。
greek: Option<OptionGreek>希腊值
open_interest_net: Option<i64>港股期权新增
未平仓净额
distance_due_date: Option<i64>距离到期日天数 -1表示过期,-2表示没有到期日
contract_nominal_ammount: Option<u64>合约名义金额.精度10^9
positive_number_of_hand: Option<i64>相等正股手数
option_type: Option<i32>(0:美式期权,1:欧式期权,2:百慕大期权)
multiplier: Option<u32>乘数
hp_contract_size: Option<u64>每份合约数[放大 10^9 倍]
hp_multiplier: Option<u64>乘数[放大 10^9 倍]
Implementations§
Source§impl Option
impl Option
Sourcepub fn price_strike(&self) -> i64
pub fn price_strike(&self) -> i64
Returns the value of price_strike, or the default value if price_strike is unset.
Sourcepub fn contract_size(&self) -> i64
pub fn contract_size(&self) -> i64
Returns the value of contract_size, or the default value if contract_size is unset.
Sourcepub fn open_interest(&self) -> i64
pub fn open_interest(&self) -> i64
Returns the value of open_interest, or the default value if open_interest is unset.
Sourcepub fn open_interest_previous_trade_day(&self) -> i64
pub fn open_interest_previous_trade_day(&self) -> i64
Returns the value of open_interest_previous_trade_day, or the default value if open_interest_previous_trade_day is unset.
Returns the value of premium, or the default value if premium is unset.
Sourcepub fn implied_volatility(&self) -> i64
pub fn implied_volatility(&self) -> i64
Returns the value of implied_volatility, or the default value if implied_volatility is unset.
Sourcepub fn open_interest_net(&self) -> i64
pub fn open_interest_net(&self) -> i64
Returns the value of open_interest_net, or the default value if open_interest_net is unset.
Sourcepub fn distance_due_date(&self) -> i64
pub fn distance_due_date(&self) -> i64
Returns the value of distance_due_date, or the default value if distance_due_date is unset.
Sourcepub fn contract_nominal_ammount(&self) -> u64
pub fn contract_nominal_ammount(&self) -> u64
Returns the value of contract_nominal_ammount, or the default value if contract_nominal_ammount is unset.
Sourcepub fn positive_number_of_hand(&self) -> i64
pub fn positive_number_of_hand(&self) -> i64
Returns the value of positive_number_of_hand, or the default value if positive_number_of_hand 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 multiplier(&self) -> u32
pub fn multiplier(&self) -> u32
Returns the value of multiplier, or the default value if multiplier is unset.
Sourcepub fn hp_contract_size(&self) -> u64
pub fn hp_contract_size(&self) -> u64
Returns the value of hp_contract_size, or the default value if hp_contract_size is unset.
Sourcepub fn hp_multiplier(&self) -> u64
pub fn hp_multiplier(&self) -> u64
Returns the value of hp_multiplier, or the default value if hp_multiplier is unset.
Trait Implementations§
Source§impl Message for Option
impl Message for Option
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.impl Copy for Option
impl Eq for Option
impl StructuralPartialEq for Option
Auto Trait Implementations§
impl Freeze for Option
impl RefUnwindSafe for Option
impl Send for Option
impl Sync for Option
impl Unpin for Option
impl UnsafeUnpin for Option
impl UnwindSafe for Option
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.