pub struct KlineItem {Show 16 fields
pub time: Option<u64>,
pub time_zone: Option<i32>,
pub close_price: Option<i64>,
pub open_price: Option<i64>,
pub highest_price: Option<i64>,
pub lowest_price: Option<i64>,
pub volume: Option<u64>,
pub turnover: Option<u64>,
pub pe: Option<u32>,
pub turnover_rate: Option<u32>,
pub last_close_price: Option<i64>,
pub stib_afterhour_volume: Option<u64>,
pub stib_afterhour_turnover: Option<u64>,
pub implied_volatility: Option<i64>,
pub ytm: Option<i64>,
pub point_type: Option<i32>,
}Expand description
K线数据点
Fields§
§time: Option<u64>时间戳,按分钟圆整
time_zone: Option<i32>时间时区,用于显示当地时间计算
close_price: Option<i64>以下数据,可能没有,比如当前交易时间未到time
收盘价,单位: *10^9
open_price: Option<i64>开盘价,单位: *10^9
highest_price: Option<i64>最高价,单位: *10^9
lowest_price: Option<i64>最低价,单位: *10^9
volume: Option<u64>成交量,单位: 1
turnover: Option<u64>成交额,单位: *10^3
pe: Option<u32>市盈率,单位: *10^3
turnover_rate: Option<u32>换手率,单位: *10^5, 1000即1%
last_close_price: Option<i64>上次收盘价,单位: *10^9,用于计算当前点的涨跌幅、涨跌额
stib_afterhour_volume: Option<u64>科创板盘后成交量,单位: 1
stib_afterhour_turnover: Option<u64>科创板盘后成交额,单位: *10^3
implied_volatility: Option<i64>期权的隐含波动率(引申波幅),放大1000倍。例如:协议值12345,表示12.345%
ytm: Option<i64>到期收益率*10^9, 例如:协议值12345000000,表示12.345%
point_type: Option<i32>数据点类型(用于区分补点),见PointType枚举,若未返回或0值则需要忽略
Implementations§
Source§impl KlineItem
impl KlineItem
Sourcepub fn time_zone(&self) -> i32
pub fn time_zone(&self) -> i32
Returns the value of time_zone, or the default value if time_zone is unset.
Sourcepub fn close_price(&self) -> i64
pub fn close_price(&self) -> i64
Returns the value of close_price, or the default value if close_price is unset.
Sourcepub fn open_price(&self) -> i64
pub fn open_price(&self) -> i64
Returns the value of open_price, or the default value if open_price is unset.
Sourcepub fn highest_price(&self) -> i64
pub fn highest_price(&self) -> i64
Returns the value of highest_price, or the default value if highest_price is unset.
Sourcepub fn lowest_price(&self) -> i64
pub fn lowest_price(&self) -> i64
Returns the value of lowest_price, or the default value if lowest_price is unset.
Sourcepub fn volume(&self) -> u64
pub fn volume(&self) -> u64
Returns the value of volume, or the default value if volume is unset.
Sourcepub fn turnover(&self) -> u64
pub fn turnover(&self) -> u64
Returns the value of turnover, or the default value if turnover is unset.
Sourcepub fn turnover_rate(&self) -> u32
pub fn turnover_rate(&self) -> u32
Returns the value of turnover_rate, or the default value if turnover_rate is unset.
Sourcepub fn last_close_price(&self) -> i64
pub fn last_close_price(&self) -> i64
Returns the value of last_close_price, or the default value if last_close_price is unset.
Sourcepub fn stib_afterhour_volume(&self) -> u64
pub fn stib_afterhour_volume(&self) -> u64
Returns the value of stib_afterhour_volume, or the default value if stib_afterhour_volume is unset.
Sourcepub fn stib_afterhour_turnover(&self) -> u64
pub fn stib_afterhour_turnover(&self) -> u64
Returns the value of stib_afterhour_turnover, or the default value if stib_afterhour_turnover 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 point_type(&self) -> i32
pub fn point_type(&self) -> i32
Returns the value of point_type, or the default value if point_type is unset.
Trait Implementations§
Source§impl Message for KlineItem
impl Message for KlineItem
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 KlineItem
impl Eq for KlineItem
impl StructuralPartialEq for KlineItem
Auto Trait Implementations§
impl Freeze for KlineItem
impl RefUnwindSafe for KlineItem
impl Send for KlineItem
impl Sync for KlineItem
impl Unpin for KlineItem
impl UnsafeUnpin for KlineItem
impl UnwindSafe for KlineItem
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.