Expand description
v1.4.113 US overnight order parity: CMD20874 dynamic overnight white list.
给 C++ AdjustTradeSession 的 Session_ALL → ALL_DAY/ETH 分支提供 broker+stock_id cache.
CMD20874 QryNightWhitelistClient — dynamic overnight white list.
C++ source of truth:
NNProtoCenter/Trade/NNProto_Trd_OvernightWhiteList.cppNNDataCenter/Trade/NNData_Trd_OvernightWhiteList.cppFTGateway/GTWCmdAndPushReply.cpp::Timer_PullOvernightWhiteList
OpenD startup loads cached overnight_white_list.dat, then periodically
sends CMD20874 per broker. AdjustTradeSession uses the in-memory
IsStockInWhiteList(enBroker, secInfo.nSecID) result: Session_ALL stays
ALL_DAY only for broker+stock IDs in this list; otherwise it downgrades
to ETH.
§Hardcoded / Assumption Ledger
- CMD20874 is
NN_ProtoCmd_Trd_OvernightWhiteList, from C++NNBase_Define_ProtoCmd.h. - Valid brokers
{1001,1007,1008,1009}are copied from C++NNData_Trd_OvernightWhiteList.cpp::IsValidBrokerID(Futu HK/US/SG/AU). stock_id_listis gzip-compressed bytes containing nativeuint64_tstock IDs. Official OpenD targets little-endian macOS/Windows in our test matrix, so Rust decodes explicit little-endianu64chunks rather than host-native order.- Current
BackendConn::requestdoes not expose C++nExtErrCode == -1009cache-match replies. A decode/fetch error leaves the last cache intact; normal response updates remain dynamic.
Structs§
- Overnight
Whitelist Cache - Shared per-broker overnight whitelist cache.
- Overnight
Whitelist Snapshot - Decoded CMD20874 response.
Constants§
- CMD_
TRD_ OVERNIGHT_ WHITE_ LIST - CMD20874
NN_ProtoCmd_Trd_OvernightWhiteList. - DEFAULT_
UPDATE_ INTERVAL_ SECS - C++ fallback interval in
OMEvProc_OvernightWhiteListwhen backend does not provide a usableupdate_interval. - MIN_
UPDATE_ INTERVAL_ SECS - Minimum refresh interval guard for malformed backend values.