pub struct Account {Show 30 fields
pub id: Option<u64>,
pub broker: Option<Broker>,
pub market: Option<u32>,
pub acc_id: Option<u32>,
pub enable_market: Vec<u32>,
pub owner_uid: Option<u64>,
pub opr_uid: Option<u64>,
pub type: Option<i32>,
pub state: Option<i32>,
pub mixed_state: Option<i32>,
pub card_number: Option<String>,
pub trade_disable: Option<bool>,
pub self_trade_disable: Option<bool>,
pub loan_enable: Option<bool>,
pub self_loan_enable: Option<bool>,
pub grant_state: Option<i32>,
pub acc_diy_name: Option<String>,
pub acc_business_name: Vec<AccBusinessName>,
pub hk_bcan_info: Option<HkbcanInfo>,
pub settlement_type: Option<u32>,
pub sub_accounts: Vec<SubAccount>,
pub is_esop: Option<bool>,
pub ira_type: Option<u32>,
pub trading_capability: Vec<u32>,
pub custodian_info: Vec<CustodianInfo>,
pub kouza_type: Option<u32>,
pub name_info: Option<NameInfo>,
pub broker_type_info: Option<BrokerTypeInfo>,
pub esop_type: Option<String>,
pub permissions: Vec<Permission>,
}Expand description
业务账户(第二层)
Fields§
§id: Option<u64>账户ID,唯一标记一个业务账户(跨券商唯一)
broker: Option<Broker>由brokerID(16bit)+marketID(16bit,后端)+accountID(32bit)组成的64位长ID
所属券商
market: Option<u32>市场ID,取值参考AccountMarket枚举
acc_id: Option<u32>业务ID(broker_firm_id+market_id+account_id唯一标记一个业务账户)
enable_market: Vec<u32>交易市场,取值参考TradeMarket枚举
owner_uid: Option<u64>用户ID(账户归属人ID)
opr_uid: Option<u64>用户ID(账户操作人ID,同请求uid)
type: Option<i32>业务账户融资类型,取值参考Type枚举
state: Option<i32>业务账户状态,取值参考State枚举
mixed_state: Option<i32>混合状态(只会返回3,4),取值参考MixedState枚举
card_number: Option<String>业务账户16位卡号
trade_disable: Option<bool>后台是否禁止该业务账户的交易能力
self_trade_disable: Option<bool>用户自己是否禁止该业务账户的交易能力
loan_enable: Option<bool>后台是否允许该业务账户使用融资能力
self_loan_enable: Option<bool>用户自己是否允许该业务账户使用融资能力
grant_state: Option<i32>授权状态(以前富途HK交易社会化引入的,废弃,默认取0)
acc_diy_name: Option<String>业务账户自定义别名(废弃,后端返回空)
acc_business_name: Vec<AccBusinessName>账户业务名称(ESOP专有账户名称)
hk_bcan_info: Option<HkbcanInfo>富途HK港股BCAN信息
settlement_type: Option<u32>交收模式,取值参考SettlementType枚举
sub_accounts: Vec<SubAccount>子账户列表
is_esop: Option<bool>是否有ESOP激励入口
ira_type: Option<u32>税减账户类型,取值参见枚举IRAType,非税减账户,该字段不设置
trading_capability: Vec<u32>交易能力,取值参考TradingCapability(目前已支持CA,AU,MY;JP于日本信用账户需求开始支持)
custodian_info: Vec<CustodianInfo>上游托管信息,例如澳洲账户支持港股正股,美股正股和澳股正股
kouza_type: Option<u32>但是只有澳股正股有托管的概念,这里就会只会返回澳股正股的托管模式
JP账户类型(JP特有),取值参考枚举KouzaType
name_info: Option<NameInfo>业务账户名称信息;如果为综合账户下的业务账户,其数据和其所属的综合账户数据相同
broker_type_info: Option<BrokerTypeInfo>OM账户信息,只有账户是OM账户的情况该字段才有值
esop_type: Option<String>账户的ESOP类型,取值参考EsopType枚举
permissions: Vec<Permission>交易权限列表,目前只有CA主体有该特性
Implementations§
Source§impl Account
impl Account
Sourcepub fn market(&self) -> u32
pub fn market(&self) -> u32
Returns the value of market, or the default value if market is unset.
Sourcepub fn acc_id(&self) -> u32
pub fn acc_id(&self) -> u32
Returns the value of acc_id, or the default value if acc_id is unset.
Sourcepub fn owner_uid(&self) -> u64
pub fn owner_uid(&self) -> u64
Returns the value of owner_uid, or the default value if owner_uid is unset.
Sourcepub fn opr_uid(&self) -> u64
pub fn opr_uid(&self) -> u64
Returns the value of opr_uid, or the default value if opr_uid is unset.
Sourcepub fn type(&self) -> Type
pub fn type(&self) -> Type
Returns the enum value of type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn mixed_state(&self) -> MixedState
pub fn mixed_state(&self) -> MixedState
Returns the enum value of mixed_state, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_mixed_state(&mut self, value: MixedState)
pub fn set_mixed_state(&mut self, value: MixedState)
Sets mixed_state to the provided enum value.
Sourcepub fn card_number(&self) -> &str
pub fn card_number(&self) -> &str
Returns the value of card_number, or the default value if card_number is unset.
Sourcepub fn trade_disable(&self) -> bool
pub fn trade_disable(&self) -> bool
Returns the value of trade_disable, or the default value if trade_disable is unset.
Sourcepub fn self_trade_disable(&self) -> bool
pub fn self_trade_disable(&self) -> bool
Returns the value of self_trade_disable, or the default value if self_trade_disable is unset.
Sourcepub fn loan_enable(&self) -> bool
pub fn loan_enable(&self) -> bool
Returns the value of loan_enable, or the default value if loan_enable is unset.
Sourcepub fn self_loan_enable(&self) -> bool
pub fn self_loan_enable(&self) -> bool
Returns the value of self_loan_enable, or the default value if self_loan_enable is unset.
Sourcepub fn grant_state(&self) -> GrantState
pub fn grant_state(&self) -> GrantState
Returns the enum value of grant_state, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_grant_state(&mut self, value: GrantState)
pub fn set_grant_state(&mut self, value: GrantState)
Sets grant_state to the provided enum value.
Sourcepub fn acc_diy_name(&self) -> &str
pub fn acc_diy_name(&self) -> &str
Returns the value of acc_diy_name, or the default value if acc_diy_name is unset.
Sourcepub fn settlement_type(&self) -> u32
pub fn settlement_type(&self) -> u32
Returns the value of settlement_type, or the default value if settlement_type is unset.
Sourcepub fn is_esop(&self) -> bool
pub fn is_esop(&self) -> bool
Returns the value of is_esop, or the default value if is_esop is unset.
Sourcepub fn ira_type(&self) -> u32
pub fn ira_type(&self) -> u32
Returns the value of ira_type, or the default value if ira_type is unset.
Sourcepub fn kouza_type(&self) -> u32
pub fn kouza_type(&self) -> u32
Returns the value of kouza_type, or the default value if kouza_type is unset.
Trait Implementations§
Source§impl Message for Account
impl Message for Account
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.