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
impl Funds
Sourcepub fn currency(&self) -> i32
pub fn currency(&self) -> i32
Returns the value of currency, or the default value if currency is unset.
Sourcepub fn available_funds(&self) -> f64
pub fn available_funds(&self) -> f64
Returns the value of available_funds, or the default value if available_funds is unset.
Sourcepub fn unrealized_pl(&self) -> f64
pub fn unrealized_pl(&self) -> f64
Returns the value of unrealized_pl, or the default value if unrealized_pl is unset.
Sourcepub fn realized_pl(&self) -> f64
pub fn realized_pl(&self) -> f64
Returns the value of realized_pl, or the default value if realized_pl is unset.
Sourcepub fn risk_level(&self) -> i32
pub fn risk_level(&self) -> i32
Returns the value of risk_level, or the default value if risk_level is unset.
Sourcepub fn initial_margin(&self) -> f64
pub fn initial_margin(&self) -> f64
Returns the value of initial_margin, or the default value if initial_margin is unset.
Sourcepub fn maintenance_margin(&self) -> f64
pub fn maintenance_margin(&self) -> f64
Returns the value of maintenance_margin, or the default value if maintenance_margin is unset.
Sourcepub fn max_power_short(&self) -> f64
pub fn max_power_short(&self) -> f64
Returns the value of max_power_short, or the default value if max_power_short is unset.
Sourcepub fn net_cash_power(&self) -> f64
pub fn net_cash_power(&self) -> f64
Returns the value of net_cash_power, or the default value if net_cash_power is unset.
Sourcepub fn long_mv(&self) -> f64
pub fn long_mv(&self) -> f64
Returns the value of long_mv, or the default value if long_mv is unset.
Sourcepub fn short_mv(&self) -> f64
pub fn short_mv(&self) -> f64
Returns the value of short_mv, or the default value if short_mv is unset.
Sourcepub fn pending_asset(&self) -> f64
pub fn pending_asset(&self) -> f64
Returns the value of pending_asset, or the default value if pending_asset is unset.
Sourcepub fn max_withdrawal(&self) -> f64
pub fn max_withdrawal(&self) -> f64
Returns the value of max_withdrawal, or the default value if max_withdrawal is unset.
Sourcepub fn risk_status(&self) -> i32
pub fn risk_status(&self) -> i32
Returns the value of risk_status, or the default value if risk_status is unset.
Sourcepub fn margin_call_margin(&self) -> f64
pub fn margin_call_margin(&self) -> f64
Returns the value of margin_call_margin, or the default value if margin_call_margin is unset.
Sourcepub fn is_pdt(&self) -> bool
pub fn is_pdt(&self) -> bool
Returns the value of is_pdt, or the default value if is_pdt is unset.
Sourcepub fn pdt_seq(&self) -> &str
pub fn pdt_seq(&self) -> &str
Returns the value of pdt_seq, or the default value if pdt_seq is unset.
Sourcepub fn beginning_dtbp(&self) -> f64
pub fn beginning_dtbp(&self) -> f64
Returns the value of beginning_dtbp, or the default value if beginning_dtbp is unset.
Sourcepub fn remaining_dtbp(&self) -> f64
pub fn remaining_dtbp(&self) -> f64
Returns the value of remaining_dtbp, or the default value if remaining_dtbp is unset.
Sourcepub fn dt_call_amount(&self) -> f64
pub fn dt_call_amount(&self) -> f64
Returns the value of dt_call_amount, or the default value if dt_call_amount is unset.
Sourcepub fn dt_status(&self) -> i32
pub fn dt_status(&self) -> i32
Returns the value of dt_status, or the default value if dt_status is unset.
Sourcepub fn securities_assets(&self) -> f64
pub fn securities_assets(&self) -> f64
Returns the value of securities_assets, or the default value if securities_assets is unset.
Sourcepub fn fund_assets(&self) -> f64
pub fn fund_assets(&self) -> f64
Returns the value of fund_assets, or the default value if fund_assets is unset.
Sourcepub fn bond_assets(&self) -> f64
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<'de> Deserialize<'de> for Funds
impl<'de> Deserialize<'de> for Funds
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for Funds
impl Message for Funds
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.