Skip to main content

CachedOrderBookLevel

Struct CachedOrderBookLevel 

Source
pub struct CachedOrderBookLevel {
    pub price: f64,
    pub volume: i64,
    pub order_count: i32,
    pub detail_list: Vec<CachedOrderBookDetail>,
    pub hp_volume: Option<f64>,
}
Expand description

摆盘单层

Fields§

§price: f64§volume: i64§order_count: i32§detail_list: Vec<CachedOrderBookDetail>

v1.4.106 codex 1140 F7 (P2 audit Finding 7): SF 行情订单明细列表. backend OrderBookItem.orders (重复 OrderInfo: order_id + order_size). 仅 HK SF 行情 + prob=BIT_PROB_ORDER_BOOK_ALL_WITH_ID 时 backend 才返; 普通行情 → 空 vec. 下游 ftapi Qot_Common.OrderBook.detailList 透传.

§hp_volume: Option<f64>

v1.4.110 codex audit Round4 R4-4: 高精度委托数量 (crypto 适用).

crypto 盘口的 volume 是放大整数 (size × 10^order_size_precision), i64 无法表示小数量; hp_volume = volume / 10^precision 是真实小数量. 普通行情 volume 已是精确整数 → None (对齐 C++ has_hpvolume()==false 时 fallback volume). 下游 emit 到 ftapi Qot_Common.OrderBook.hpVolume.

对齐 C++ QotRealTimeData.cpp pOrderBookItem->set_hpvolume(...) + merge gear.dVolume += has_hpvolume() ? hpvolume() : volume() —— merge 累加的是 de-scale 后的真实量, 故按 level 存 (不同交易所 precision 可能不同).

Trait Implementations§

Source§

impl Clone for CachedOrderBookLevel

Source§

fn clone(&self) -> CachedOrderBookLevel

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 CachedOrderBookLevel

Source§

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

Formats the value using the given formatter. Read more

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.

§

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.

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