pub struct PstnInfo {Show 28 fields
pub pstn_id: Option<String>,
pub pstn_type: Option<i32>,
pub market: Option<u32>,
pub symbol: Option<String>,
pub qty: Option<String>,
pub qty_hold: Option<String>,
pub qty_avbl: Option<String>,
pub cost_price: Option<String>,
pub buy_avg_price: Option<String>,
pub cur_price: Option<String>,
pub mv: Option<String>,
pub profit: Option<String>,
pub profit_ratio: Option<String>,
pub today_turnover: Option<String>,
pub today_buy_qty: Option<String>,
pub today_buy_turnover: Option<String>,
pub today_buy_avg_price: Option<String>,
pub today_sell_qty: Option<String>,
pub today_sell_turnover: Option<String>,
pub today_sell_avg_price: Option<String>,
pub today_profit: Option<String>,
pub stock_name: Option<String>,
pub ref_close_position_value: Option<String>,
pub instrument_type: Option<u32>,
pub security_type: Option<u32>,
pub unrealized_profit: Option<String>,
pub realized_profit: Option<String>,
pub underlying_price: Option<String>,
}Fields§
§pstn_id: Option<String>server保证唯一
pstn_type: Option<i32>0->多仓, 1->空仓
market: Option<u32>取值参考 Market
symbol: Option<String>持仓代码
qty: Option<String>空仓为负数
qty_hold: Option<String>冻结数量
qty_avbl: Option<String>可用数量
cost_price: Option<String>成本价, 若无效, 对应显示的字符串也填入该字段
buy_avg_price: Option<String>平均买入价
cur_price: Option<String>当前价
mv: Option<String>市值
profit: Option<String>盈亏金额
profit_ratio: Option<String>盈亏比例, 若无效, 对应显示的字符串也填入该字段
today_turnover: Option<String>§today_buy_qty: Option<String>§today_buy_turnover: Option<String>§today_buy_avg_price: Option<String>§today_sell_qty: Option<String>§today_sell_turnover: Option<String>§today_sell_avg_price: Option<String>§today_profit: Option<String>§stock_name: Option<String>§ref_close_position_value: Option<String>砍仓参考额
instrument_type: Option<u32>注:客户端接交易2.0后这个字段不使用 0:股票, 1:期权, 2:期货
security_type: Option<u32>交易品种 取值参考SecurityType
unrealized_profit: Option<String>未实现盈亏
realized_profit: Option<String>已实现盈亏
underlying_price: Option<String>对应正股的当前价
Implementations§
Source§impl PstnInfo
impl PstnInfo
Sourcepub fn pstn_id(&self) -> &str
pub fn pstn_id(&self) -> &str
Returns the value of pstn_id, or the default value if pstn_id is unset.
Sourcepub fn pstn_type(&self) -> i32
pub fn pstn_type(&self) -> i32
Returns the value of pstn_type, or the default value if pstn_type is unset.
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 symbol(&self) -> &str
pub fn symbol(&self) -> &str
Returns the value of symbol, or the default value if symbol is unset.
Sourcepub fn qty_hold(&self) -> &str
pub fn qty_hold(&self) -> &str
Returns the value of qty_hold, or the default value if qty_hold is unset.
Sourcepub fn qty_avbl(&self) -> &str
pub fn qty_avbl(&self) -> &str
Returns the value of qty_avbl, or the default value if qty_avbl is unset.
Sourcepub fn cost_price(&self) -> &str
pub fn cost_price(&self) -> &str
Returns the value of cost_price, or the default value if cost_price is unset.
Sourcepub fn buy_avg_price(&self) -> &str
pub fn buy_avg_price(&self) -> &str
Returns the value of buy_avg_price, or the default value if buy_avg_price is unset.
Sourcepub fn cur_price(&self) -> &str
pub fn cur_price(&self) -> &str
Returns the value of cur_price, or the default value if cur_price is unset.
Sourcepub fn profit(&self) -> &str
pub fn profit(&self) -> &str
Returns the value of profit, or the default value if profit is unset.
Sourcepub fn profit_ratio(&self) -> &str
pub fn profit_ratio(&self) -> &str
Returns the value of profit_ratio, or the default value if profit_ratio is unset.
Sourcepub fn today_turnover(&self) -> &str
pub fn today_turnover(&self) -> &str
Returns the value of today_turnover, or the default value if today_turnover is unset.
Sourcepub fn today_buy_qty(&self) -> &str
pub fn today_buy_qty(&self) -> &str
Returns the value of today_buy_qty, or the default value if today_buy_qty is unset.
Sourcepub fn today_buy_turnover(&self) -> &str
pub fn today_buy_turnover(&self) -> &str
Returns the value of today_buy_turnover, or the default value if today_buy_turnover is unset.
Sourcepub fn today_buy_avg_price(&self) -> &str
pub fn today_buy_avg_price(&self) -> &str
Returns the value of today_buy_avg_price, or the default value if today_buy_avg_price is unset.
Sourcepub fn today_sell_qty(&self) -> &str
pub fn today_sell_qty(&self) -> &str
Returns the value of today_sell_qty, or the default value if today_sell_qty is unset.
Sourcepub fn today_sell_turnover(&self) -> &str
pub fn today_sell_turnover(&self) -> &str
Returns the value of today_sell_turnover, or the default value if today_sell_turnover is unset.
Sourcepub fn today_sell_avg_price(&self) -> &str
pub fn today_sell_avg_price(&self) -> &str
Returns the value of today_sell_avg_price, or the default value if today_sell_avg_price 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 stock_name(&self) -> &str
pub fn stock_name(&self) -> &str
Returns the value of stock_name, or the default value if stock_name is unset.
Sourcepub fn ref_close_position_value(&self) -> &str
pub fn ref_close_position_value(&self) -> &str
Returns the value of ref_close_position_value, or the default value if ref_close_position_value is unset.
Sourcepub fn instrument_type(&self) -> u32
pub fn instrument_type(&self) -> u32
Returns the value of instrument_type, or the default value if instrument_type is unset.
Sourcepub fn security_type(&self) -> u32
pub fn security_type(&self) -> u32
Returns the value of security_type, or the default value if security_type 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 underlying_price(&self) -> &str
pub fn underlying_price(&self) -> &str
Returns the value of underlying_price, or the default value if underlying_price is unset.
Trait Implementations§
Source§impl Message for PstnInfo
impl Message for PstnInfo
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.impl Eq for PstnInfo
impl StructuralPartialEq for PstnInfo
Auto Trait Implementations§
impl Freeze for PstnInfo
impl RefUnwindSafe for PstnInfo
impl Send for PstnInfo
impl Sync for PstnInfo
impl Unpin for PstnInfo
impl UnsafeUnpin for PstnInfo
impl UnwindSafe for PstnInfo
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.