Skip to main content

order_book_max_depth_for_security

Function order_book_max_depth_for_security 

Source
pub fn order_book_max_depth_for_security(
    info: &CachedSecurityInfo,
    qr: &QotRightData,
) -> usize
Expand description

C++ GetOrderBookMaxNum 对齐版:根据证券静态市场 + 行情权限决定 orderbook push/cache 应保留的档位数。

Ref:

  • FutuOpenD/Src/APIServer/APIServer_Inner_API.cpp:4331-4412
  • FutuOpenD/Src/APIServer/Business/Quote/QotRealTimeData.cpp:1211-1215

Hardcoded / Assumption Ledger:

  • mkt_id 范围复用 backend stock-list 的 NN_QuoteMktID 区间;1400..=1499 只在 sec_type=Future 时作为 live HK futures 私有 market_code 兜底。
  • HK option/future depth 缺省为 0,和 C++ NNData_Qot_Right 构造默认值一致。
  • 普通 HK/US/CN 股票在 Unknown 权限下保留 C++ 初始化默认值/分支语义, 避免 push parser 在权限刷新窗口内把有效 backend push 误清空。