#[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
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).
QuotePushToConn
行情首推快照 → 只推给当前连接.
C++ RegOrUnRegPush(..., bFirstPush=true) 调
IQotRealTimeData::PushDataCache(nConnID, ...), 目标是发起注册的
单个连接,而不是所有已 RegPush 的连接。普通 QuotePush 走
(sec_key, sub_type, rehab_type) fanout;首推必须保留 direct-to-conn
语义,避免新连接注册时把缓存快照重复广播给旧连接。
BroadcastPush
广播推送 → 发送给所有已连接的客户端 (到价提醒等)
TradeReQuery
交易数据重查 (收到 _UPDATE 通知后触发)
Fields
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 有效。
TradeOrderDirect
高速通道订单内容推送 (notice_type=100).
C++ NNProto_Trd_OnPush.cpp:125-136 对 100 直接 UnPackOrderList +
UpdateAndNotifyOneOrder,不会转成 ORDER_UPDATE,也不会再发
QueryOrderInfo/QueryOrderList。
TradeOrderCached
本地已构造的当前订单推送.
用于 PlaceOrder ACK 后立即把本地 stub 以标准 Trd_UpdateOrder 发给已订阅 客户端,补齐 C++ 下单后可见的初始状态推送,同时仍经 PushDispatcher 的 订阅 / scope / allowed_acc_ids / allowed_markets 过滤链路。
TradeFillDirect
高速通道成交内容推送 (notice_type=101).
C++ NNProto_Trd_OnPush.cpp 对 101 直接 UnPackDealList +
UpdateAndNotifyOneDeal,不会再发 4710/14710 或 4715/14715 重查。
CryptoOrderReQuery
Crypto 订单推送 (CMD20648) → 按推送携带的 string order id 重查详情.
CryptoAssetReQuery
Crypto 资产推送 (CMD20635) → 重查 crypto account asset/positions.