Expand description
v1.4.106 codex 1148 F2 (P2): 公共 Qot_Common.QotMarket → symbol suffix
转换。
此前 crates/futu-gateway-qot/src/handlers/qot/option.rs::qot_market_to_symbol_suffix
与 crates/futu-gateway-core/src/bridge/mkt_id_refresh.rs 各有一份 inline 表,
后者跑漂移 (51 → HK_Future、62 → MY、72 → CA、漏 81 → FX)。
收敛为单一 source of truth,对齐 proto 枚举:
来源: proto/Qot_Common.proto:8-21
QotMarket_Unknown = 0;
QotMarket_HK_Security = 1; // 香港市场
QotMarket_HK_Future = 2; // 港期货 (已废弃, 使用 HK_Security)
QotMarket_US_Security = 11; // 美国市场
QotMarket_CNSH_Security = 21; // 沪股市场
QotMarket_CNSZ_Security = 22; // 深股市场
QotMarket_SG_Security = 31; // 新加坡市场
QotMarket_JP_Security = 41; // 日本市场
QotMarket_AU_Security = 51; // 澳大利亚市场
QotMarket_MY_Security = 61; // 马来西亚市场
QotMarket_CA_Security = 71; // 加拿大市场
QotMarket_FX_Security = 81; // 外汇市场后端 CMD 20106 SecuritiesReq.symbols 用 "CODE.SUFFIX" 格式 (e.g.
"AAPL.US" / "00700.HK")。本 helper 把 FTAPI QotMarket 值转为对应的
后端 symbol 后缀。
注意: 后端真正的“symbol_suffix“是从 quote_config_svr.proto:82 下发的
配置而不是硬编码 (C++ 不在源码内 hardcode 这个表)。daemon 直连 backend
时不查 quote_config,因此这里维护一份硬编码版作 cache-first 路由。下次
backend 增加新市场时此处需同步更新。
Functions§
- qot_
market_ to_ symbol_ suffix - FTAPI
Qot_Common.QotMarket(proto enum 值) → backend symbol suffix ("CODE.{SUFFIX}"用于 CMD 20106SecuritiesReq.symbols).