pub struct CtpConfig {
pub gateway_name: String,
pub broker_id: String,
pub td_addr: String,
pub td_user: String,
pub td_password: String,
pub td_auth_code: String,
pub td_app_id: String,
pub md_addr: String,
pub md_user: String,
pub md_password: String,
pub product_classes: ProductClasses,
}Expand description
网关配置(对齐原稿 connect setting 141-171;地址补前缀由使用方完成—— 原稿在 connect 里对缺 “tcp://”/“ssl://” 的地址自动补 “tcp://”, 本 crate 要求调用方先行规整,保持驱动数据纯净)。
Debug 手工掩码(0.10.0,BD-CFG-18):td_password/md_password 永远 ****。
Fields§
§gateway_name: String网关/插件注册名(唯一;默认 “ctp”)
broker_id: String经纪公司代码
td_addr: String交易前置
td_user: String交易用户
td_password: String交易密码
td_auth_code: String授权编码(空 = 直接登录,原稿 448-451)
td_app_id: String产品名称(AppID)
md_addr: String行情前置
md_user: String行情用户
md_password: String行情密码
product_classes: ProductClasses收录的产品类白名单(D-PC-FILTER;空 = 回落默认「期货」'1')。
查询侧不过滤,收录侧按它严格丢弃(不进共享表、不上抛 eContract)。
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CtpConfig
impl RefUnwindSafe for CtpConfig
impl Send for CtpConfig
impl Sync for CtpConfig
impl Unpin for CtpConfig
impl UnsafeUnpin for CtpConfig
impl UnwindSafe for CtpConfig
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
Mutably borrows from an owned value. Read more