Funds

Struct Funds 

Source
pub struct Funds {
Show 33 fields pub power: f64, pub total_assets: f64, pub cash: f64, pub market_val: f64, pub frozen_cash: f64, pub debt_cash: f64, pub avl_withdrawal_cash: f64, pub currency: Option<i32>, pub available_funds: Option<f64>, pub unrealized_pl: Option<f64>, pub realized_pl: Option<f64>, pub risk_level: Option<i32>, pub initial_margin: Option<f64>, pub maintenance_margin: Option<f64>, pub cash_info_list: Vec<AccCashInfo>, pub max_power_short: Option<f64>, pub net_cash_power: Option<f64>, pub long_mv: Option<f64>, pub short_mv: Option<f64>, pub pending_asset: Option<f64>, pub max_withdrawal: Option<f64>, pub risk_status: Option<i32>, pub margin_call_margin: Option<f64>, pub is_pdt: Option<bool>, pub pdt_seq: Option<String>, pub beginning_dtbp: Option<f64>, pub remaining_dtbp: Option<f64>, pub dt_call_amount: Option<f64>, pub dt_status: Option<i32>, pub securities_assets: Option<f64>, pub fund_assets: Option<f64>, pub bond_assets: Option<f64>, pub market_info_list: Vec<AccMarketInfo>,
}
Expand description

账户资金结构

Fields§

§power: f64

最大购买力(做多),3位精度,下同。

§total_assets: f64

资产净值

§cash: f64

现金

§market_val: f64

证券市值, 仅证券账户适用

§frozen_cash: f64

冻结资金

§debt_cash: f64

计息金额

§avl_withdrawal_cash: f64

现金可提,仅证券账户适用

§currency: Option<i32>

币种,本结构体资金相关的货币类型,取值参见 Currency,期货适用

§available_funds: Option<f64>

可用资金,期货适用

§unrealized_pl: Option<f64>

未实现盈亏,期货适用

§realized_pl: Option<f64>

已实现盈亏,期货适用

§risk_level: Option<i32>

风控状态,参见 CltRiskLevel, 期货适用

§initial_margin: Option<f64>

初始保证金

§maintenance_margin: Option<f64>

维持保证金

§cash_info_list: Vec<AccCashInfo>

分币种的现金信息,期货适用

§max_power_short: Option<f64>

卖空购买力

§net_cash_power: Option<f64>

现金购买力

§long_mv: Option<f64>

多头市值

§short_mv: Option<f64>

空头市值

§pending_asset: Option<f64>

在途资产

§max_withdrawal: Option<f64>

融资可提,仅证券账户适用

§risk_status: Option<i32>

风险状态,参见 [CltRiskStatus],证券账户适用,共分 9 个等级,LEVEL1是最安全,LEVEL9是最危险

§margin_call_margin: Option<f64>

Margin Call 保证金

§is_pdt: Option<bool>

是否PDT账户,仅富途证券(美国)账户适用

§pdt_seq: Option<String>

剩余日内交易次数

§beginning_dtbp: Option<f64>

初始日内交易购买力

§remaining_dtbp: Option<f64>

剩余日内交易购买力

§dt_call_amount: Option<f64>

日内交易待缴金额

§dt_status: Option<i32>

日内交易限制情况,取值见DTStatus

§securities_assets: Option<f64>

证券资产净值

§fund_assets: Option<f64>

基金资产净值

§bond_assets: Option<f64>

债券资产净值

§market_info_list: Vec<AccMarketInfo>

分市场资产信息

Implementations§

Source§

impl Funds

Source

pub fn currency(&self) -> i32

Returns the value of currency, or the default value if currency is unset.

Source

pub fn available_funds(&self) -> f64

Returns the value of available_funds, or the default value if available_funds is unset.

Source

pub fn unrealized_pl(&self) -> f64

Returns the value of unrealized_pl, or the default value if unrealized_pl is unset.

Source

pub fn realized_pl(&self) -> f64

Returns the value of realized_pl, or the default value if realized_pl is unset.

Source

pub fn risk_level(&self) -> i32

Returns the value of risk_level, or the default value if risk_level is unset.

Source

pub fn initial_margin(&self) -> f64

Returns the value of initial_margin, or the default value if initial_margin is unset.

Source

pub fn maintenance_margin(&self) -> f64

Returns the value of maintenance_margin, or the default value if maintenance_margin is unset.

Source

pub fn max_power_short(&self) -> f64

Returns the value of max_power_short, or the default value if max_power_short is unset.

Source

pub fn net_cash_power(&self) -> f64

Returns the value of net_cash_power, or the default value if net_cash_power is unset.

Source

pub fn long_mv(&self) -> f64

Returns the value of long_mv, or the default value if long_mv is unset.

Source

pub fn short_mv(&self) -> f64

Returns the value of short_mv, or the default value if short_mv is unset.

Source

pub fn pending_asset(&self) -> f64

Returns the value of pending_asset, or the default value if pending_asset is unset.

Source

pub fn max_withdrawal(&self) -> f64

Returns the value of max_withdrawal, or the default value if max_withdrawal is unset.

Source

pub fn risk_status(&self) -> i32

Returns the value of risk_status, or the default value if risk_status is unset.

Source

pub fn margin_call_margin(&self) -> f64

Returns the value of margin_call_margin, or the default value if margin_call_margin is unset.

Source

pub fn is_pdt(&self) -> bool

Returns the value of is_pdt, or the default value if is_pdt is unset.

Source

pub fn pdt_seq(&self) -> &str

Returns the value of pdt_seq, or the default value if pdt_seq is unset.

Source

pub fn beginning_dtbp(&self) -> f64

Returns the value of beginning_dtbp, or the default value if beginning_dtbp is unset.

Source

pub fn remaining_dtbp(&self) -> f64

Returns the value of remaining_dtbp, or the default value if remaining_dtbp is unset.

Source

pub fn dt_call_amount(&self) -> f64

Returns the value of dt_call_amount, or the default value if dt_call_amount is unset.

Source

pub fn dt_status(&self) -> i32

Returns the value of dt_status, or the default value if dt_status is unset.

Source

pub fn securities_assets(&self) -> f64

Returns the value of securities_assets, or the default value if securities_assets is unset.

Source

pub fn fund_assets(&self) -> f64

Returns the value of fund_assets, or the default value if fund_assets is unset.

Source

pub fn bond_assets(&self) -> f64

Returns the value of bond_assets, or the default value if bond_assets is unset.

Trait Implementations§

Source§

impl Clone for Funds

Source§

fn clone(&self) -> Funds

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 Funds

Source§

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

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

impl Default for Funds

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Funds
where Funds: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Message for Funds

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for Funds

Source§

fn eq(&self, other: &Funds) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Funds

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Funds

Auto Trait Implementations§

§

impl Freeze for Funds

§

impl RefUnwindSafe for Funds

§

impl Send for Funds

§

impl Sync for Funds

§

impl Unpin for Funds

§

impl UnwindSafe for Funds

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.

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> 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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,