Expand description
CMD 18012 kCmdGetLv2RelatedExchange — 数字货币 LV2 摆盘关联交易所查询.
对齐 C++:
NNProtoCenter/Quote/NNBiz_Qot_CryptoExchange.cpp:24-51GetLv2RelatedExchange(): 构造FTMdfRelatedSvr::GetLv2RelatedExchangeReq, 填stock_id+ 可选broker_id_list, 走NN_TCPProtoCategory_Quote发 CMD 18012.NNProtoCenter/Quote/NNBiz_Qot_CryptoExchange.cpp:82-154OnReply_*: 遍历pbRsp.exchange_list(), 用UnpackExchangeInfo解每条 ExchangeInfo, 若exchange_name == "PT"且GetCryptoPTOrderBookQotRight() != NN_QotRight_CC_Level1则过滤掉 (line 123-126).NNProtoCenter/Quote/INNBiz_Qot_CryptoExchange.cpp:15-18: FTGateway/APIServer 通过INNBiz_Qot_CryptoExchange::GetLv2RelatedExchange触发, response 写入INNData_Qot_CryptoExchange::SetLv2RelatedExchange并触发INNBiz_Qot_PushQot::ReSubCryptoOrderBook重新订阅.
§v1.4.110 codex QOT Phase 4 Slice 7
之前 Rust 数字货币 LV2 摆盘只走普通 OrderBook bit=3 路径, 拿不到 multi-exchange 合并后的 40 档摆盘. 本模块补 CMD18012 caller, 给 GetOrderBookHandler / push parser 提供 stock→exchange 列表 + PT 过滤, 是 broker-aware crypto LV2 orderbook 完整 sub-system 的入口.
§Hardcoded / Assumption Ledger
- CMD 18012 (
NN_ProtoCmd_Qot_Pull_GetLv2RelatedExchange) 来源:/Users/leaf/ai-lab/o-src/FutuOpenD/Src/NNBase/NNBase_Define_ProtoCmd.h(在 18000 系列 quote-related cmd 范围). 已加入is_unencrypted_proto白名单 (nn_codec.rs::is_unencrypted_proto). - PT 过滤阈值
cc_pt_orderbook_qot_right == NN_QotRight_CC_Level1 (==2)来源:NNBiz_Qot_CryptoExchange.cpp:123INNData_Qot_Right::GetCryptoPTOrderBookQotRight() != NN_QotRight_CC_Level1. Rustcc_pt_orderbook_qot_right即对应字段; constants 见futu-cache::qot_right(QOT_RIGHT_LEVEL1 = 2). exchange_name == "PT"是 C++#define CRYPTO_PTExchange _TStr("PT")协议常量 (NNBiz_Qot_CryptoExchange.cpp:14). 不是服务端动态下发的列表名, Rust 复刻可接受.
Structs§
- Crypto
Exchange Info - Re-export
CryptoExchangeInfofromfutu_cache— single source of truth.
Constants§
- CMD_
GET_ LV2_ RELATED_ EXCHANGE - CMD 号 — 数字货币 LV2 关联交易所查询.
- CRYPTO_
PT_ EXCHANGE_ NAME - C++
#define CRYPTO_PTExchange _TStr("PT")(NNBiz_Qot_CryptoExchange.cpp:14). 当cc_pt_orderbook_qot_right != QOT_RIGHT_LEVEL1时, 跳过此 exchange_name 的 entry.
Functions§
- get_
lv2_ related_ exchange - 发 CMD18012 GetLv2RelatedExchange, 解析 response 成
Vec<CryptoExchangeInfo>.