pub struct CurrencyData {Show 17 fields
pub currency: Option<String>,
pub total_asset: Option<String>,
pub balance: Option<String>,
pub hold: Option<String>,
pub available: Option<String>,
pub drawable: Option<String>,
pub mv: Option<String>,
pub long_mv: Option<String>,
pub short_mv: Option<String>,
pub unrealized_profit: Option<String>,
pub realized_profit: Option<String>,
pub average_profit: Option<String>,
pub diluted_profit: Option<String>,
pub today_profit: Option<String>,
pub today_profit_ratio: Option<String>,
pub max_power_long: Option<String>,
pub max_power_short: Option<String>,
}Expand description
币种相关字段,按currency币种统计计算
Fields§
§currency: Option<String>币种代码,比如HKD、USD
total_asset: Option<String>资产净值(现金+持仓市值)
balance: Option<String>现金结余
hold: Option<String>现金冻结
available: Option<String>现金可用
drawable: Option<String>现金可提
mv: Option<String>持仓市值
long_mv: Option<String>多头持仓市值
short_mv: Option<String>空头持仓市值
unrealized_profit: Option<String>未实现盈亏
realized_profit: Option<String>已实现盈亏
average_profit: Option<String>累计持仓盈亏(平均成本价)
diluted_profit: Option<String>累计持仓盈亏(摊薄成本价)
today_profit: Option<String>今日盈亏
today_profit_ratio: Option<String>今日盈亏比例
max_power_long: Option<String>max_power_long/max_power_short 这两个字段是临时方案,为了快速实现客户端区分是否需要刷新可买可卖数量的需求【其他场景不要使用】
最大最多购买力,max_power_long=available
max_power_short: Option<String>最大做空购买力,max_power_short=0
Implementations§
Source§impl CurrencyData
impl CurrencyData
Sourcepub fn currency(&self) -> &str
pub fn currency(&self) -> &str
Returns the value of currency, or the default value if currency is unset.
Sourcepub fn total_asset(&self) -> &str
pub fn total_asset(&self) -> &str
Returns the value of total_asset, or the default value if total_asset is unset.
Sourcepub fn balance(&self) -> &str
pub fn balance(&self) -> &str
Returns the value of balance, or the default value if balance is unset.
Sourcepub fn available(&self) -> &str
pub fn available(&self) -> &str
Returns the value of available, or the default value if available is unset.
Sourcepub fn drawable(&self) -> &str
pub fn drawable(&self) -> &str
Returns the value of drawable, or the default value if drawable is unset.
Sourcepub fn long_mv(&self) -> &str
pub fn long_mv(&self) -> &str
Returns the value of long_mv, or the default value if long_mv is unset.
Sourcepub fn short_mv(&self) -> &str
pub fn short_mv(&self) -> &str
Returns the value of short_mv, or the default value if short_mv is unset.
Sourcepub fn unrealized_profit(&self) -> &str
pub fn unrealized_profit(&self) -> &str
Returns the value of unrealized_profit, or the default value if unrealized_profit is unset.
Sourcepub fn realized_profit(&self) -> &str
pub fn realized_profit(&self) -> &str
Returns the value of realized_profit, or the default value if realized_profit is unset.
Sourcepub fn average_profit(&self) -> &str
pub fn average_profit(&self) -> &str
Returns the value of average_profit, or the default value if average_profit is unset.
Sourcepub fn diluted_profit(&self) -> &str
pub fn diluted_profit(&self) -> &str
Returns the value of diluted_profit, or the default value if diluted_profit is unset.
Sourcepub fn today_profit(&self) -> &str
pub fn today_profit(&self) -> &str
Returns the value of today_profit, or the default value if today_profit is unset.
Sourcepub fn today_profit_ratio(&self) -> &str
pub fn today_profit_ratio(&self) -> &str
Returns the value of today_profit_ratio, or the default value if today_profit_ratio is unset.
Sourcepub fn max_power_long(&self) -> &str
pub fn max_power_long(&self) -> &str
Returns the value of max_power_long, or the default value if max_power_long is unset.
Sourcepub fn max_power_short(&self) -> &str
pub fn max_power_short(&self) -> &str
Returns the value of max_power_short, or the default value if max_power_short is unset.
Trait Implementations§
Source§impl Clone for CurrencyData
impl Clone for CurrencyData
Source§fn clone(&self) -> CurrencyData
fn clone(&self) -> CurrencyData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CurrencyData
impl Debug for CurrencyData
Source§impl Default for CurrencyData
impl Default for CurrencyData
Source§impl Hash for CurrencyData
impl Hash for CurrencyData
Source§impl Message for CurrencyData
impl Message for CurrencyData
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.Source§impl PartialEq for CurrencyData
impl PartialEq for CurrencyData
impl Eq for CurrencyData
impl StructuralPartialEq for CurrencyData
Auto Trait Implementations§
impl Freeze for CurrencyData
impl RefUnwindSafe for CurrencyData
impl Send for CurrencyData
impl Sync for CurrencyData
impl Unpin for CurrencyData
impl UnsafeUnpin for CurrencyData
impl UnwindSafe for CurrencyData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.