Skip to main content

DepthMarketData

Struct DepthMarketData 

Source
pub struct DepthMarketData {
Show 36 fields pub instrument_id: String, pub exchange_id: String, pub last_price: f64, pub volume: f64, pub turnover: f64, pub open_interest: f64, pub upper_limit_price: f64, pub lower_limit_price: f64, pub open_price: f64, pub highest_price: f64, pub lowest_price: f64, pub pre_close_price: f64, pub bid_price1: f64, pub bid_price2: f64, pub bid_price3: f64, pub bid_price4: f64, pub bid_price5: f64, pub ask_price1: f64, pub ask_price2: f64, pub ask_price3: f64, pub ask_price4: f64, pub ask_price5: f64, pub bid_volume1: f64, pub bid_volume2: f64, pub bid_volume3: f64, pub bid_volume4: f64, pub bid_volume5: f64, pub ask_volume1: f64, pub ask_volume2: f64, pub ask_volume3: f64, pub ask_volume4: f64, pub ask_volume5: f64, pub update_time: String, pub update_millisec: i64, pub trading_day: String, pub action_day: String,
}
Expand description

深度行情行(CThostFtdcDepthMarketDataField 窄面;md onRtnDepthMarketData 336 处实际取用字段)。

原稿取用:InstrumentID/Volume/Turnover/OpenInterest/LastPrice/UpperLimitPrice/ LowerLimitPrice/OpenPrice/HighestPrice/LowestPrice/PreClosePrice/BidPrice1..5/ AskPrice1..5/BidVolume1..5/AskVolume1..5/UpdateTime/UpdateMillisec/ActionDay。

Fields§

§instrument_id: String

合约代码(CTP InstrumentID,不带交易所)

§exchange_id: String

交易所代码(0.12.0 D-XFALLBACK 新增的镜像字段)。

原稿不读这个字段(它用合约表查交易所),所以这是本数据面比原稿多的 一个字段 —— 记档偏差见 DESIGN D-XFALLBACK。

存在的唯一理由:合约不在册时,没有它就判不出交易所,只能把整条行情丢掉。 柜台的 CThostFtdcDepthMarketDataField 本来就带 ExchangeID,读它是 取用既有事实,不是猜。

§last_price: f64

最新价(MAX_FLOAT 表全停板,原稿 331 行 adjust_price 归零处理)

§volume: f64

当日累计成交量

§turnover: f64

当日累计成交额

§open_interest: f64

持仓量

§upper_limit_price: f64

涨停价

§lower_limit_price: f64

跌停价

§open_price: f64

今开

§highest_price: f64

最高

§lowest_price: f64

最低

§pre_close_price: f64

昨收

§bid_price1: f64

买一价..买五价(MAX_FLOAT 时 adjust_price 归零)

§bid_price2: f64

买二价

§bid_price3: f64

买三价

§bid_price4: f64

买四价

§bid_price5: f64

买五价

§ask_price1: f64

卖一价

§ask_price2: f64

卖二价

§ask_price3: f64

卖三价

§ask_price4: f64

卖四价

§ask_price5: f64

卖五价

§bid_volume1: f64

买一量

§bid_volume2: f64

买二量

§bid_volume3: f64

买三量

§bid_volume4: f64

买四量

§bid_volume5: f64

买五量

§ask_volume1: f64

卖一量

§ask_volume2: f64

卖二量

§ask_volume3: f64

卖三量

§ask_volume4: f64

卖四量

§ask_volume5: f64

卖五量

§update_time: String

更新时间(“HH:MM:SS”)

§update_millisec: i64

更新毫秒段

§trading_day: String

交易日(“YYYYMMDD”;报文 TradingDay 原值,业务日的权威来源。记档偏差: 原稿不读该字段,这是从 DepthMarketData 上岸的唯一新字段,见 DESIGN D-TZ)

§action_day: String

行动日(“YYYYMMDD”)

Trait Implementations§

Source§

impl Clone for DepthMarketData

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DepthMarketData

Source§

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

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

impl Default for DepthMarketData

Source§

fn default() -> Self

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

impl PartialEq for DepthMarketData

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DepthMarketData

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> 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> 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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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