Skip to main content

OptionItem

Struct OptionItem 

Source
pub struct OptionItem {
Show 67 fields pub option_id: Option<i64>, pub hp_strike_price: Option<i64>, pub strike_date: Option<i64>, pub option_type: Option<i32>, pub exercise_type: Option<i32>, pub expiration_type: Option<i32>, pub in_the_money: Option<i32>, pub price: Option<i64>, pub mid_price: Option<i64>, pub bid_price: Option<i64>, pub ask_price: Option<i64>, pub bid_ask_spread: Option<i64>, pub bid_volume: Option<i64>, pub ask_volume: Option<i64>, pub bid_ask_volume_ratio: Option<i64>, pub chg_ratio: Option<i64>, pub volume: Option<i64>, pub turnover: Option<i64>, pub open_interest: Option<i64>, pub open_interest_market_cap: Option<i64>, pub oi_day_chg: Option<i64>, pub oi_week_chg: Option<i64>, pub vol_day_chg_ratio: Option<i64>, pub oi_day_chg_ratio: Option<i64>, pub vol_week_chg_ratio: Option<i64>, pub oi_week_chg_ratio: Option<i64>, pub implied_volatility: Option<i64>, pub history_volatility: Option<i64>, pub iv_hv_ratio: Option<i64>, pub delta: Option<i64>, pub gamma: Option<i64>, pub vega: Option<i64>, pub theta: Option<i64>, pub rho: Option<i64>, pub leverage_ratio: Option<i64>, pub effective_gearing: Option<i64>, pub buy_to_bep: Option<i64>, pub sell_to_bep: Option<i64>, pub buy_profit_probability: Option<i64>, pub sell_profit_probability: Option<i64>, pub intrinsi_value_per: Option<i64>, pub time_value_per: Option<i64>, pub itm_degree: Option<i64>, pub otm_degree: Option<i64>, pub itm_probability: Option<i64>, pub otm_probability: Option<i64>, pub sell_annualized_return: Option<i64>, pub underlying_info: Option<UnderlyingStatisticInfo>, pub standard_type: Option<i32>, pub option_name: Option<String>, pub premium: Option<i64>, pub interval_return: Option<i64>, pub striked_interval_return: Option<i64>, pub striked_annualized_return: Option<i64>, pub vol_oi_ratio: Option<i64>, pub vol_avg: Option<MultiDayAvg>, pub oi_avg: Option<MultiDayAvg>, pub left_day: Option<i32>, pub underlying_instrument_type_v2: Option<i32>, pub oi_day_market_cap_chg: Option<i64>, pub oi_week_market_cap_chg: Option<i64>, pub product_code: Option<String>, pub multiplier: Option<i64>, pub contract_share_size: Option<i64>, pub chain: Option<ChainStatisticInfo>, pub strike_date_timestamp: Option<i64>, pub spread_table_code: Option<i32>,
}

Fields§

§option_id: Option<i64>

期权id

§hp_strike_price: Option<i64>

行权价,精度10**9

§strike_date: Option<i64>

行权日,格式为年月日(eg: 20240305)

§option_type: Option<i32>

期权类型, 行权方向:call/put,参考OptionType

§exercise_type: Option<i32>

行权方式:美式、欧式等,参考OptionExerciseMethodType

§expiration_type: Option<i32>

到期类型:周期权、月期权、季期权等,参考ExpirationType

§in_the_money: Option<i32>

是否实值期权(价内、价外),1:实值期权(价内),0:虚值期权(价外),参考InTheMoneyType

§price: Option<i64>

期权价格, 精度10**9

§mid_price: Option<i64>

期权中间价, 精度10*9

§bid_price: Option<i64>

期权买价, 精度10*9

§ask_price: Option<i64>

期权卖价, 精度10*9

§bid_ask_spread: Option<i64>

期权买卖价差, 精度10*9

§bid_volume: Option<i64>

期权买量,单位为1

§ask_volume: Option<i64>

期权卖量,单位为1

§bid_ask_volume_ratio: Option<i64>

期权买卖量比,精度为10**5 (eg: 买量130,卖量100,则返回130000)

§chg_ratio: Option<i64>

期权涨跌幅,精度为10**5 (eg: 涨幅1.5%,则返回1500)

§volume: Option<i64>

期权成交量,单位为1

§turnover: Option<i64>

期权成交额,精度为10**3 (eg: 1000.5元,则返回1000500)

§open_interest: Option<i64>

期权持仓量,单位为1

§open_interest_market_cap: Option<i64>

持仓市值,精度为10**3 (eg: 1000.5元,则返回1000500)

§oi_day_chg: Option<i64>

持仓量日变化量,单位为1(>0 为增仓,<0 为减仓)

§oi_week_chg: Option<i64>

持仓量周变化量,单位为1(>0 为增仓,<0 为减仓

§vol_day_chg_ratio: Option<i64>

成交量日变化率,精度为10**5 (eg: 1.5%,则返回1500)

§oi_day_chg_ratio: Option<i64>

持仓量日变化率,精度为10**5 (eg: 1.5%,则返回1500)

§vol_week_chg_ratio: Option<i64>

成交量周变化率,精度为10**5 (eg: 1.5%,则返回1500)

§oi_week_chg_ratio: Option<i64>

持仓量周变化率,精度为10**5 (eg: 1.5%,则返回1500)

§implied_volatility: Option<i64>

隐含波动率,精度为10**5 (eg: 20.5%,则返回20500)

§history_volatility: Option<i64>

历史波动率,精度为10**5 (eg: 20.5%,则返回20500)

§iv_hv_ratio: Option<i64>

iv/hv,精度为10**5 (eg: 1.5,则返回150000)

§delta: Option<i64>

delta,精度为10**5 (eg: 1.5%,则返回1500)

§gamma: Option<i64>

gamma,精度为10**5 (eg: 1.5%,则返回1500)

§vega: Option<i64>

vega,精度为10**5 (eg: 1.5%,则返回1500)

§theta: Option<i64>

theta,精度为10**5 (eg: 1.5%,则返回1500)

§rho: Option<i64>

rho,精度为10**5 (eg: 1.5%,则返回1500)

§leverage_ratio: Option<i64>

杠杆比率,精度为10**5 (eg: 1.5,则返回150000)

§effective_gearing: Option<i64>

有效杠杆,精度为10**5 (eg: 1.5,则返回150000)

§buy_to_bep: Option<i64>

买入到盈亏平衡点,精度为10**5 (eg: 1.5%,则返回1500)

§sell_to_bep: Option<i64>

卖出到盈亏平衡点,精度为10**5 (eg: 1.5%,则返回1500)

§buy_profit_probability: Option<i64>

买入盈利概率,精度为10**5 (eg: 1.5%,则返回1500)

§sell_profit_probability: Option<i64>

卖出盈利概率,精度为10**5 (eg: 1.5%,则返回1500)

§intrinsi_value_per: Option<i64>

内在价值百分比,精度为10**5 (eg: 1.5%,则返回1500)

§time_value_per: Option<i64>

时间价值百分比,精度为10**5 (eg: 1.5%,则返回1500)

§itm_degree: Option<i64>

价内程度,精度为10**5 (eg: 1.5,则返回150000) itm: in the money otm : out of the money

§otm_degree: Option<i64>

价外程度,精度为10**5 (eg: 1.5,则返回150000)

§itm_probability: Option<i64>

价内概率(又称行权概率),精度为10**5 (eg: 1.5%,则返回1500)

§otm_probability: Option<i64>

价外概率,精度为10**5 (eg: 1.5%,则返回1500)

§sell_annualized_return: Option<i64>

卖出年化收益率,精度为10**5 (eg: 1.5%,则返回1500)

§underlying_info: Option<UnderlyingStatisticInfo>

标的资产期权数据

§standard_type: Option<i32>

是否标准期权,参考StandardType(svr内部使用,客户端忽略)

§option_name: Option<String>

期权名称

§premium: Option<i64>

权利金,精度10^9

§interval_return: Option<i64>

区间收益率,精度10^5

§striked_interval_return: Option<i64>

被行权区间收益率,精度10^5

§striked_annualized_return: Option<i64>

被行权年化收益率,精度10^5

§vol_oi_ratio: Option<i64>

成交量/持仓量,精度为10**5 (eg: 1.5,则返回150000)

§vol_avg: Option<MultiDayAvg>

多日成交量均值,精度为10**3(eg: 1.5,则返回1500)

§oi_avg: Option<MultiDayAvg>

多日持仓量均值,精度为10**3(eg: 1.5,则返回1500)

§left_day: Option<i32>

距离到期日,单位:天,精度为1

§underlying_instrument_type_v2: Option<i32>

标的品类类型,@fservice公共协议security_type.proto 的InstrumentTypeV2枚举,可用于筛选标的是否正股/ETF等

§oi_day_market_cap_chg: Option<i64>

持仓市值日变化量,精度10*3,(>0 为增仓市值,<0 为减仓市值)

§oi_week_market_cap_chg: Option<i64>

持仓市值周变化量,精度10*3,(>0 为增仓市值,<0 为减仓市值)

§product_code: Option<String>

链的prodoct_code/symbol

§multiplier: Option<i64>

合约乘数,精度10*9

§contract_share_size: Option<i64>

合约规模,精度10*9

§chain: Option<ChainStatisticInfo>

链的统计信息

§strike_date_timestamp: Option<i64>

行权日时间戳,单位:秒

§spread_table_code: Option<i32>

期权静态信息,仅用于展示,不参与筛选、排序的字段,字段序号100-200

价位表代码

Implementations§

Source§

impl OptionItem

Source

pub fn option_id(&self) -> i64

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

Source

pub fn hp_strike_price(&self) -> i64

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

Source

pub fn strike_date(&self) -> i64

Returns the value of strike_date, or the default value if strike_date 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 exercise_type(&self) -> i32

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

Source

pub fn expiration_type(&self) -> i32

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

Source

pub fn in_the_money(&self) -> i32

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

Source

pub fn price(&self) -> i64

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

Source

pub fn mid_price(&self) -> i64

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

Source

pub fn bid_price(&self) -> i64

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

Source

pub fn ask_price(&self) -> i64

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

Source

pub fn bid_ask_spread(&self) -> i64

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

Source

pub fn bid_volume(&self) -> i64

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

Source

pub fn ask_volume(&self) -> i64

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

Source

pub fn bid_ask_volume_ratio(&self) -> i64

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

Source

pub fn chg_ratio(&self) -> i64

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

Source

pub fn volume(&self) -> i64

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

Source

pub fn turnover(&self) -> i64

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

Source

pub fn open_interest(&self) -> i64

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

Source

pub fn open_interest_market_cap(&self) -> i64

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

Source

pub fn oi_day_chg(&self) -> i64

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

Source

pub fn oi_week_chg(&self) -> i64

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

Source

pub fn vol_day_chg_ratio(&self) -> i64

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

Source

pub fn oi_day_chg_ratio(&self) -> i64

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

Source

pub fn vol_week_chg_ratio(&self) -> i64

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

Source

pub fn oi_week_chg_ratio(&self) -> i64

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

Source

pub fn implied_volatility(&self) -> i64

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

Source

pub fn history_volatility(&self) -> i64

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

Source

pub fn iv_hv_ratio(&self) -> i64

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

Source

pub fn delta(&self) -> i64

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

Source

pub fn gamma(&self) -> i64

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

Source

pub fn vega(&self) -> i64

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

Source

pub fn theta(&self) -> i64

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

Source

pub fn rho(&self) -> i64

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

Source

pub fn leverage_ratio(&self) -> i64

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

Source

pub fn effective_gearing(&self) -> i64

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

Source

pub fn buy_to_bep(&self) -> i64

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

Source

pub fn sell_to_bep(&self) -> i64

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

Source

pub fn buy_profit_probability(&self) -> i64

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

Source

pub fn sell_profit_probability(&self) -> i64

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

Source

pub fn intrinsi_value_per(&self) -> i64

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

Source

pub fn time_value_per(&self) -> i64

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

Source

pub fn itm_degree(&self) -> i64

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

Source

pub fn otm_degree(&self) -> i64

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

Source

pub fn itm_probability(&self) -> i64

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

Source

pub fn otm_probability(&self) -> i64

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

Source

pub fn sell_annualized_return(&self) -> i64

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

Source

pub fn standard_type(&self) -> i32

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

Source

pub fn option_name(&self) -> &str

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

Source

pub fn premium(&self) -> i64

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

Source

pub fn interval_return(&self) -> i64

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

Source

pub fn striked_interval_return(&self) -> i64

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

Source

pub fn striked_annualized_return(&self) -> i64

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

Source

pub fn vol_oi_ratio(&self) -> i64

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

Source

pub fn left_day(&self) -> i32

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

Source

pub fn underlying_instrument_type_v2(&self) -> i32

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

Source

pub fn oi_day_market_cap_chg(&self) -> i64

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

Source

pub fn oi_week_market_cap_chg(&self) -> i64

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

Source

pub fn product_code(&self) -> &str

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

Source

pub fn multiplier(&self) -> i64

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

Source

pub fn contract_share_size(&self) -> i64

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

Source

pub fn strike_date_timestamp(&self) -> i64

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

Source

pub fn spread_table_code(&self) -> i32

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

Trait Implementations§

Source§

impl Clone for OptionItem

Source§

fn clone(&self) -> OptionItem

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 OptionItem

Source§

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

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

impl Default for OptionItem

Source§

fn default() -> Self

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

impl Hash for OptionItem

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Message for OptionItem

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 OptionItem

Source§

fn eq(&self, other: &OptionItem) -> 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 Eq for OptionItem

Source§

impl StructuralPartialEq for OptionItem

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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.

§

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

§

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
§

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

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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