SnapshotBasicData

Struct SnapshotBasicData 

Source
pub struct SnapshotBasicData {
Show 42 fields pub security: Security, pub name: Option<String>, pub type: i32, pub is_suspend: bool, pub list_time: String, pub lot_size: i32, pub price_spread: f64, pub update_time: String, pub high_price: f64, pub open_price: f64, pub low_price: f64, pub last_close_price: f64, pub cur_price: f64, pub volume: i64, pub turnover: f64, pub turnover_rate: f64, pub list_timestamp: Option<f64>, pub update_timestamp: Option<f64>, pub ask_price: Option<f64>, pub bid_price: Option<f64>, pub ask_vol: Option<i64>, pub bid_vol: Option<i64>, pub enable_margin: Option<bool>, pub mortgage_ratio: Option<f64>, pub long_margin_initial_ratio: Option<f64>, pub enable_short_sell: Option<bool>, pub short_sell_rate: Option<f64>, pub short_available_volume: Option<i64>, pub short_margin_initial_ratio: Option<f64>, pub amplitude: Option<f64>, pub avg_price: Option<f64>, pub bid_ask_ratio: Option<f64>, pub volume_ratio: Option<f64>, pub highest52_weeks_price: Option<f64>, pub lowest52_weeks_price: Option<f64>, pub highest_history_price: Option<f64>, pub lowest_history_price: Option<f64>, pub pre_market: Option<PreAfterMarketData>, pub after_market: Option<PreAfterMarketData>, pub sec_status: Option<i32>, pub close_price5_minute: Option<f64>, pub overnight: Option<PreAfterMarketData>,
}
Expand description

基本快照数据

Fields§

§security: Security

股票

§name: Option<String>

股票名称

§type: i32

Qot_Common.SecurityType,股票类型

§is_suspend: bool

是否停牌

§list_time: String

上市时间字符串

§lot_size: i32

每手数量

§price_spread: f64

价差

§update_time: String

更新时间字符串

§high_price: f64

最高价

§open_price: f64

开盘价

§low_price: f64

最低价

§last_close_price: f64

昨收价

§cur_price: f64

最新价

§volume: i64

成交量

§turnover: f64

成交额

§turnover_rate: f64

换手率(该字段为百分比字段,默认不展示%,如20实际对应20%)

§list_timestamp: Option<f64>

上市时间戳

§update_timestamp: Option<f64>

更新时间戳

§ask_price: Option<f64>

卖价

§bid_price: Option<f64>

买价

§ask_vol: Option<i64>

卖量

§bid_vol: Option<i64>

买量

§enable_margin: Option<bool>

是否可融资,如果为true,后两个字段才有意义

§mortgage_ratio: Option<f64>

股票抵押率(该字段为百分比字段,默认不展示%,如20实际对应20%)

§long_margin_initial_ratio: Option<f64>

融资初始保证金率(该字段为百分比字段,默认不展示%,如20实际对应20%)

§enable_short_sell: Option<bool>

是否可卖空,如果为true,后三个字段才有意义

§short_sell_rate: Option<f64>

卖空参考利率(该字段为百分比字段,默认不展示%,如20实际对应20%)

§short_available_volume: Option<i64>

剩余可卖空数量(股)

§short_margin_initial_ratio: Option<f64>

卖空(融券)初始保证金率(该字段为百分比字段,默认不展示%,如20实际对应20%)

§amplitude: Option<f64>

振幅(该字段为百分比字段,默认不展示%,如20实际对应20%)

§avg_price: Option<f64>

平均价

§bid_ask_ratio: Option<f64>

委比(该字段为百分比字段,默认不展示%,如20实际对应20%)

§volume_ratio: Option<f64>

量比

§highest52_weeks_price: Option<f64>

52周最高价

§lowest52_weeks_price: Option<f64>

52周最低价

§highest_history_price: Option<f64>

历史最高价

§lowest_history_price: Option<f64>

历史最低价

§pre_market: Option<PreAfterMarketData>

Qot_Common::PreAfterMarketData 盘前数据

§after_market: Option<PreAfterMarketData>

Qot_Common::PreAfterMarketData 盘后数据

§sec_status: Option<i32>

Qot_Common::SecurityStatus 股票状态

§close_price5_minute: Option<f64>

5分钟收盘价

§overnight: Option<PreAfterMarketData>

Qot_Common::PreAfterMarketData 夜盘数据

Implementations§

Source§

impl SnapshotBasicData

Source

pub fn list_timestamp(&self) -> f64

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

Source

pub fn update_timestamp(&self) -> f64

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

Source

pub fn ask_price(&self) -> f64

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

Source

pub fn bid_price(&self) -> f64

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

Source

pub fn ask_vol(&self) -> i64

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

Source

pub fn bid_vol(&self) -> i64

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

Source

pub fn enable_margin(&self) -> bool

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

Source

pub fn mortgage_ratio(&self) -> f64

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

Source

pub fn long_margin_initial_ratio(&self) -> f64

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

Source

pub fn enable_short_sell(&self) -> bool

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

Source

pub fn short_sell_rate(&self) -> f64

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

Source

pub fn short_available_volume(&self) -> i64

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

Source

pub fn short_margin_initial_ratio(&self) -> f64

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

Source

pub fn amplitude(&self) -> f64

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

Source

pub fn avg_price(&self) -> f64

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

Source

pub fn bid_ask_ratio(&self) -> f64

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

Source

pub fn volume_ratio(&self) -> f64

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

Source

pub fn highest52_weeks_price(&self) -> f64

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

Source

pub fn lowest52_weeks_price(&self) -> f64

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

Source

pub fn highest_history_price(&self) -> f64

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

Source

pub fn lowest_history_price(&self) -> f64

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

Source

pub fn sec_status(&self) -> i32

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

Source

pub fn close_price5_minute(&self) -> f64

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

Source

pub fn name(&self) -> &str

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

Trait Implementations§

Source§

impl Clone for SnapshotBasicData

Source§

fn clone(&self) -> SnapshotBasicData

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 SnapshotBasicData

Source§

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

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

impl Default for SnapshotBasicData

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for SnapshotBasicData

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 SnapshotBasicData

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 SnapshotBasicData

Source§

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

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 SnapshotBasicData

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>,