Quote

Struct Quote 

Source
pub struct Quote {
Show 62 fields pub instrument_id: String, pub datetime: String, pub last_price: f64, pub ask_price1: f64, pub ask_volume1: i64, pub ask_price2: f64, pub ask_volume2: i64, pub ask_price3: f64, pub ask_volume3: i64, pub ask_price4: f64, pub ask_volume4: i64, pub ask_price5: f64, pub ask_volume5: i64, pub bid_price1: f64, pub bid_volume1: i64, pub bid_price2: f64, pub bid_volume2: i64, pub bid_price3: f64, pub bid_volume3: i64, pub bid_price4: f64, pub bid_volume4: i64, pub bid_price5: f64, pub bid_volume5: i64, pub highest: f64, pub lowest: f64, pub open: f64, pub close: f64, pub average: f64, pub volume: i64, pub amount: f64, pub open_interest: i64, pub lower_limit: f64, pub upper_limit: f64, pub settlement: f64, pub pre_settlement: f64, pub change: f64, pub change_percent: f64, pub strike_price: f64, pub pre_open_interest: i64, pub pre_close: f64, pub pre_volume: i64, pub margin: f64, pub commission: f64, pub class: String, pub exchange_id: String, pub product_id: String, pub product_short_name: String, pub underlying_product: String, pub underlying_symbol: String, pub delivery_year: i32, pub delivery_month: i32, pub expire_datetime: i64, pub volume_multiple: i32, pub price_tick: f64, pub price_decs: i32, pub max_market_order_vol: i32, pub min_market_order_vol: i32, pub max_limit_order_vol: i32, pub min_limit_order_vol: i32, pub expired: bool, pub py: String, pub epoch: Option<i64>,
}
Expand description

行情报价数据

Fields§

§instrument_id: String

合约代码

§datetime: String

行情时间

§last_price: f64

最新价

§ask_price1: f64

卖一价

§ask_volume1: i64

卖一量

§ask_price2: f64

卖二价

§ask_volume2: i64

卖二量

§ask_price3: f64

卖三价

§ask_volume3: i64

卖三量

§ask_price4: f64

卖四价

§ask_volume4: i64

卖四量

§ask_price5: f64

卖五价

§ask_volume5: i64

卖五量

§bid_price1: f64

买一价

§bid_volume1: i64

买一量

§bid_price2: f64

买二价

§bid_volume2: i64

买二量

§bid_price3: f64

买三价

§bid_volume3: i64

买三量

§bid_price4: f64

买四价

§bid_volume4: i64

买四量

§bid_price5: f64

买五价

§bid_volume5: i64

买五量

§highest: f64

最高价

§lowest: f64

最低价

§open: f64

开盘价

§close: f64

收盘价

§average: f64

均价

§volume: i64

成交量

§amount: f64

成交额

§open_interest: i64

持仓量

§lower_limit: f64

跌停价

§upper_limit: f64

涨停价

§settlement: f64

结算价

§pre_settlement: f64

昨结算价

§change: f64

涨跌

§change_percent: f64

涨跌幅

§strike_price: f64

行权价

§pre_open_interest: i64

昨持仓量

§pre_close: f64

昨收盘价

§pre_volume: i64

昨成交量

§margin: f64

每手保证金

§commission: f64

每手手续费

§class: String

合约类型

§exchange_id: String

交易所代码

§product_id: String

品种代码

§product_short_name: String

品种简称

§underlying_product: String

标的产品

§underlying_symbol: String

标的合约

§delivery_year: i32

交割年份

§delivery_month: i32

交割月份

§expire_datetime: i64

到期时间

§volume_multiple: i32

合约乘数

§price_tick: f64

最小变动价位

§price_decs: i32

价格小数位数

§max_market_order_vol: i32

市价单最大下单量

§min_market_order_vol: i32

市价单最小下单量

§max_limit_order_vol: i32

限价单最大下单量

§min_limit_order_vol: i32

限价单最小下单量

§expired: bool

是否已下市

§py: String

拼音

§epoch: Option<i64>

Implementations§

Source§

impl Quote

Source

pub fn update_change(&mut self)

更新涨跌和涨跌幅

Trait Implementations§

Source§

impl Clone for Quote

Source§

fn clone(&self) -> Quote

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 Quote

Source§

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

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

impl Default for Quote

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Quote

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 Serialize for Quote

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

Auto Trait Implementations§

§

impl Freeze for Quote

§

impl RefUnwindSafe for Quote

§

impl Send for Quote

§

impl Sync for Quote

§

impl Unpin for Quote

§

impl UnwindSafe for Quote

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> Instrument for T

Source§

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

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

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.

Source§

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

Source§

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

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

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,