Skip to main content

PushEvent

Enum PushEvent 

Source
#[non_exhaustive]
pub enum PushEvent { QuotePush { sec_key: String, sub_type: i32, rehab_type: i32, proto_id: u32, body: Vec<u8>, }, QuotePushToConn { conn_id: u64, proto_id: u32, body: Vec<u8>, }, BroadcastPush { proto_id: u32, body: Vec<u8>, }, TradeReQuery { acc_id: u64, notice_type: u32, order_ids: Vec<String>, order_op_req_ids: Vec<String>, order_security_type: Option<u32>, order_exchange: Option<String>, order_fill_ids: Vec<String>, order_fill_security_type: Option<u32>, order_fill_exchange: Option<String>, }, TradeOrderDirect { acc_id: u64, orders: Vec<Order>, }, TradeOrderCached { acc_id: u64, orders: Vec<CachedOrder>, }, TradeFillDirect { acc_id: u64, fills: Vec<OrderFillInfo>, }, CryptoOrderReQuery { acc_id: u64, order_ids: Vec<String>, }, CryptoAssetReQuery { acc_id: u64, }, }
Expand description

推送事件 (从 push_callback 通过 channel 发送)

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

QuotePush

行情推送 → 按订阅转发给客户端

v1.4.106 codex 1131 F4 [P1]: 加 rehab_type 字段 (KL push 走非 0 rehab, 其它 sub_type 走 0). PushDispatcher 用 (sec_key, sub_type, rehab_type) 三 元 key 查 qot_push_regs map 决定路由 conn 集合 — 仅 RegPush 注册过对应 三元 key 的 conn 收到此 push (C++ QotSubscribe.cpp:639-649 GetPushConn).

Fields

§sec_key: String
§sub_type: i32
§rehab_type: i32
§proto_id: u32
§body: Vec<u8>
§

QuotePushToConn

行情首推快照 → 只推给当前连接.

C++ RegOrUnRegPush(..., bFirstPush=true)IQotRealTimeData::PushDataCache(nConnID, ...), 目标是发起注册的 单个连接,而不是所有已 RegPush 的连接。普通 QuotePush(sec_key, sub_type, rehab_type) fanout;首推必须保留 direct-to-conn 语义,避免新连接注册时把缓存快照重复广播给旧连接。

Fields

§conn_id: u64
§proto_id: u32
§body: Vec<u8>
§

BroadcastPush

广播推送 → 发送给所有已连接的客户端 (到价提醒等)

Fields

§proto_id: u32
§body: Vec<u8>
§

TradeReQuery

交易数据重查 (收到 _UPDATE 通知后触发)

Fields

§acc_id: u64
§notice_type: u32
§order_ids: Vec<String>

CMD 4716 中携带的 order_ids (notice_type=4/100 有效)

§order_op_req_ids: Vec<String>

CMD 4716 中携带的 order_op_req_ids (notice_type=9 有效)。 C++ FindOrderIDByReqID 用它反查之前写操作记录的 backend order id。

§order_security_type: Option<u32>

C++ QueryOrderInfo 会把 notify header 中的 security_type 原样传给 backend 4707/14707。仅 order detail refresh 有效。

§order_exchange: Option<String>

C++ QueryOrderInfo 会把 notify.exchange 原样传给 backend 4707/14707。仅 order detail refresh 有效。

§order_fill_ids: Vec<String>

CMD 4716 中携带的 order_fill_ids (notice_type=6 有效)

§order_fill_security_type: Option<u32>

C++ QueryDealInfo 会把 notify header 中的 security_type 原样传给 backend 4715/14715。仅 notice_type=6 有效。

§order_fill_exchange: Option<String>

C++ QueryDealInfo 会把 notify.exchange 原样传给 backend 4715/14715。仅 notice_type=6 有效。

§

TradeOrderDirect

高速通道订单内容推送 (notice_type=100).

C++ NNProto_Trd_OnPush.cpp:125-136 对 100 直接 UnPackOrderList + UpdateAndNotifyOneOrder,不会转成 ORDER_UPDATE,也不会再发 QueryOrderInfo/QueryOrderList。

Fields

§acc_id: u64
§orders: Vec<Order>
§

TradeOrderCached

本地已构造的当前订单推送.

用于 PlaceOrder ACK 后立即把本地 stub 以标准 Trd_UpdateOrder 发给已订阅 客户端,补齐 C++ 下单后可见的初始状态推送,同时仍经 PushDispatcher 的 订阅 / scope / allowed_acc_ids / allowed_markets 过滤链路。

Fields

§acc_id: u64
§orders: Vec<CachedOrder>
§

TradeFillDirect

高速通道成交内容推送 (notice_type=101).

C++ NNProto_Trd_OnPush.cpp 对 101 直接 UnPackDealList + UpdateAndNotifyOneDeal,不会再发 4710/14710 或 4715/14715 重查。

Fields

§acc_id: u64
§fills: Vec<OrderFillInfo>
§

CryptoOrderReQuery

Crypto 订单推送 (CMD20648) → 按推送携带的 string order id 重查详情.

Fields

§acc_id: u64
§order_ids: Vec<String>
§

CryptoAssetReQuery

Crypto 资产推送 (CMD20635) → 重查 crypto account asset/positions.

Fields

§acc_id: u64

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

§

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

§

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
§

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, 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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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