Skip to main content

TrdAcc

Struct TrdAcc 

Source
pub struct TrdAcc {
    pub trd_env: i32,
    pub acc_id: u64,
    pub trd_market_auth_list: Vec<i32>,
    pub acc_type: Option<i32>,
    pub card_num: Option<String>,
    pub security_firm: Option<i32>,
    pub sim_acc_type: Option<i32>,
    pub uni_card_num: Option<String>,
    pub acc_status: Option<i32>,
    pub acc_role: Option<i32>,
    pub acc_label: Option<String>,
    pub jp_acc_type: Vec<i32>,
}
Expand description

业务账户 —— 和官方 Futu Trd_Common.TrdAcc proto 一一对应(12 字段)。

v1.4.26 前只存 3 字段(trd_env / acc_id / trd_market_auth_list), 导致 CLI futucli account 表格只有 3 列,用户看不到 security_firm / acc_type / card_num 等重要信息。现在对齐 proto 完整保留。

Fields§

§trd_env: i32

0=simulate, 1=real, 2=fund(对齐 Trd_Common.TrdEnv

§acc_id: u64

业务账号

§trd_market_auth_list: Vec<i32>

账户支持的交易市场权限(Trd_Common.TrdMarket enum: 1=HK 2=US 3=CN …)

§acc_type: Option<i32>

账户类型(Trd_Common.TrdAccType: 0=未知 1=现金 2=保证金 3=期货)

§card_num: Option<String>

账户卡号(人读标识,比如 “8105” 这样的短号)

§security_firm: Option<i32>

所属券商(Trd_Common.SecurityFirm: 1=FutuSecurities(HK) 2=FutuInc(US) 3=FutuSG 4=FutuAU 5=FutuCA 6=FutuMY 7=FutuJP)

§sim_acc_type: Option<i32>

模拟交易子类型(仅 trd_env=0 时有值,Trd_Common.SimAccType

§uni_card_num: Option<String>

综合账户卡号(子账户归属的父综合账户的 card_num)

§acc_status: Option<i32>

账户状态(Trd_Common.TrdAccStatus: 0=active 1=disabled)

§acc_role: Option<i32>

账号分类(Trd_Common.TrdAccRole: 主/子账号)

§acc_label: Option<String>

Daemon-derived user-visible account label (crypto, equity_incentive, ipo_route, …). Treat unknown values as opaque display strings.

§jp_acc_type: Vec<i32>

JP 子账户类型(日本账号特殊,Trd_Common.TrdSubAccType

Trait Implementations§

Source§

impl AccountCardRecord for TrdAcc

Source§

fn acc_id(&self) -> u64

Source§

fn card_num(&self) -> Option<&str>

Source§

fn uni_card_num(&self) -> Option<&str>

Source§

impl AccountVisibilityRecord for TrdAcc

Source§

impl Clone for TrdAcc

Source§

fn clone(&self) -> TrdAcc

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TrdAcc

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TrdAcc

Source§

fn default() -> TrdAcc

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more