pub struct StockInfo {Show 26 fields
pub stock_id: u64,
pub sequence: u64,
pub code: String,
pub name_sc: String,
pub name_tc: String,
pub name_en: String,
pub name_jp: String,
pub market_code: u32,
pub instrument_type: u32,
pub spread_table_code: u32,
pub sub_instrument_type: u32,
pub sub_instrument_type_v2: u32,
pub lot_size: u32,
pub currency_code: u32,
pub listing_date: u32,
pub delisting: bool,
pub delete_flag: bool,
pub warrnt_stock_owner: u64,
pub warrant_type: u32,
pub no_search: bool,
pub future_origin_id: u64,
pub zhuli_id: u64,
pub cc_origin: String,
pub cc_destination: String,
pub exchange: String,
pub listed_exchange: String,
}Expand description
缓存的证券信息 (从 CSStockItem 解析)
Fields§
§stock_id: u64§sequence: u64§code: String§name_sc: String§name_tc: String§name_en: String§name_jp: StringC++ Ndt_Qot_SecInfo::szNameJp, from stock_list_sync CSStockItem.ja_name field 65.
market_code: u32§instrument_type: u32§spread_table_code: u32C++ Ndt_Qot_SecInfo::nSpreadCode data source.
Source: stock_list_sync CSStockItem.spread_table_code field 13.
sub_instrument_type: u32§sub_instrument_type_v2: u32C++ Ndt_Qot_SecInfo::enSubTypeV2 data source.
Source: stock_list_sync CSStockItem.sub_instrument_type_v2 field 69.
v10.6 GetCompanyProfile uses this to split Trust/ETF routing exactly like
C++ APIServer_Qot_CompanyProfile.cpp:55-63.
lot_size: u32§currency_code: u32§listing_date: u32§delisting: bool§delete_flag: bool§warrnt_stock_owner: u64窝轮所属正股 ID (warrnt_stock_owner), 0 表示无
warrant_type: u32C++ internal NN_QotWarrantType from stock-list warrnt_type.
Values 1-5 match public Qot_Common.WarrantType; values 6/7 are C++
internal DLC Long/Short and are filtered out by GetReference(WARRANT).
no_search: bool不可搜索标记 (no_search), true 表示不可搜索
future_origin_id: u64v1.4.106 codex F5: 期货主连合约关联 stock_id (proto field 41 origin_id).
含义 (对齐 C++ Ndt_Qot_SecInfo::nFutureOriginID): 当前 row 是主连合约
(e.g. HSImain, NQmain) 时, origin_id 指向真实月份合约的 stock_id;
普通合约 (HSI2604 / NQ2606) 此字段为 0.
F5 用途: PlaceOrder 在 IsFuturesTrdMarket && origin_id != 0 时
异步发 CMD 6747 拉真实合约 code, 用真实 code 下单 (对齐 C++
APIServer_Trd_PlaceOrder.cpp:632-650 ReqMainLinkContract 流程).
zhuli_id: u64v1.4.106 codex F5: 期货主力合约 stock_id (proto field 40 zhuli_id).
含义: 主连合约持有此字段, 指向当前主力合约 stock_id (流动性最大).
CMD 6747 响应解析此字段后用 id_to_key 反查 code → 替换 PlaceOrder
c2s.code 后下发. 普通合约此字段为 0.
cc_origin: StringCrypto 货币对左侧货币 (C++ CSStockItem.cc_origin, proto field 60).
cc_destination: StringCrypto 货币对右侧货币 (C++ CSStockItem.cc_destination, proto field 61).
exchange: Stringv1.4.110 final E.5 P2#6: 交易所 (proto field 57, e.g. “SEHK”, “NASDAQ”).
数据驱动 fallback (pitfall #35 C++ 数据驱动 vs Rust 启发式): trade
handler 的 derive_exchange_str 应优先用此字段, 缺失时再 fallback 到
pattern match heuristic. backend 不下发此字段时为空串.
listed_exchange: Stringv1.4.110 final E.5 P2#6: 上市交易所 (proto field 74).
通常与 exchange 相同, dual-listed ADR / 双重主要上市等场景下不同
(e.g. 港股通的 H 股可能 exchange=HKEX, listed_exchange=SEHK).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StockInfo
impl RefUnwindSafe for StockInfo
impl Send for StockInfo
impl Sync for StockInfo
impl Unpin for StockInfo
impl UnsafeUnpin for StockInfo
impl UnwindSafe for StockInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more