pub struct AccPstnInfo {Show 64 fields
pub pstn_id: Option<String>,
pub pstn_type: Option<i32>,
pub account_market: Option<u32>,
pub symbol: Option<String>,
pub qty: Option<String>,
pub qty_hold: Option<String>,
pub qty_avbl: Option<String>,
pub diluted_cost: Option<String>,
pub average_cost: Option<String>,
pub cur_price: Option<String>,
pub mv: Option<String>,
pub diluted_profit: Option<String>,
pub diluted_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 security_type: Option<u32>,
pub currency: Option<u32>,
pub unrealized_profit: Option<String>,
pub realized_profit: Option<String>,
pub sub_pstn_num: Option<u32>,
pub exchange_id: Option<u32>,
pub from_combo: Option<String>,
pub underlying_price: Option<String>,
pub average_profit: Option<String>,
pub average_profit_ratio: Option<String>,
pub im: Option<String>,
pub exchange: Option<String>,
pub underlying_stock_id: Option<String>,
pub expiring_flag: Option<bool>,
pub proactive_qty: Option<String>,
pub lapse_qty: Option<String>,
pub in_the_money_depth: Option<f64>,
pub stock_id: Option<String>,
pub stock_market: Option<u32>,
pub im_ratio: Option<String>,
pub mm_ratio: Option<String>,
pub cc_matched_quantity: Option<String>,
pub spread_matched_quantity: Option<String>,
pub straddle_matched_quantity: Option<String>,
pub position_ratio: Option<String>,
pub mm: Option<String>,
pub last_mv: Option<String>,
pub cp_matched_quantity: Option<String>,
pub strangle_matched_quantity: Option<String>,
pub last_profit: Option<String>,
pub last_close_price: Option<String>,
pub sub_account_id: Option<u64>,
pub liquidate_last: Option<u32>,
pub open_time: Option<u64>,
pub pstn_state: Option<PstnState>,
pub open_fill_id: Option<String>,
pub business_position_id: Option<String>,
pub yesterday_incomes: Option<String>,
pub accumulated_incomes: Option<String>,
pub shareable: Option<bool>,
pub short_name: Option<String>,
}Expand description
账户单个持仓信息
Fields§
§pstn_id: Option<String>server保证唯一
pstn_type: Option<i32>0->多仓, 1->空仓
account_market: Option<u32>账号对应的市场, 取值参考odr_sys_cmn.AccountMarket
symbol: Option<String>持仓代码(如果是基金持仓,该字段表示基金的stock_id)
qty: Option<String>空仓为负数,若数量为0,则显示 –
qty_hold: Option<String>冻结数量
qty_avbl: Option<String>可用数量
diluted_cost: Option<String>摊薄成本,期货没使用这个字段,若该字段数字无效,svr返回 –
average_cost: Option<String>平均成本,也是期货的开仓价,若该字段数字无效,svr返回 –
cur_price: Option<String>当前价
mv: Option<String>市值
diluted_profit: Option<String>摊薄成本盈亏(股票)/收益(基金),当选择使用摊薄成本时使用该字段
diluted_profit_ratio: Option<String>摊薄成本盈亏比例(股票)/收益率(基金),当选择使用摊薄成本时使用该字段,若该字段数字无效,svr返回 –
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>砍仓参考额
security_type: Option<u32>交易品种 取值参考SecurityType
currency: Option<u32>取值参考 Currency
unrealized_profit: Option<String>未实现盈亏
realized_profit: Option<String>已实现盈亏
sub_pstn_num: Option<u32>以下字段目前只有期货用到
期货子持仓个数,该汇总持仓下有几次成交,就有几个子持仓
exchange_id: Option<u32>期货所属交易所 market_code:如港股期货:114
from_combo: Option<String>期货所属组合代码
underlying_price: Option<String>支持underlying price
对应正股的当前价
average_profit: Option<String>平均成本盈亏(股票)/收益(基金),当选择使用平均成本时使用该字段
average_profit_ratio: Option<String>平均成本盈亏比例(股票)/收益率(基金),当选择使用平均成本时使用该字段
im: Option<String>risk oa 使用
初始保证金要求
exchange: Option<String>期货所属交易所代码,如HKFE
underlying_stock_id: Option<String>衍生品返回对应正股的stock_id,正股返回自己的stock_id
expiring_flag: Option<bool>是否临期标志位,期权使用
proactive_qty: Option<String>已申请提前行权的有效数量,仅供期权使用
lapse_qty: Option<String>已申请放弃行权的有效数量,仅供期权使用
in_the_money_depth: Option<f64>价内深度,正时价内,负时价外
stock_id: Option<String>§stock_market: Option<u32>持仓对应的市场, 取值参考odr_sys_cmn.StockMarket
im_ratio: Option<String>初始保证金率
mm_ratio: Option<String>维持保证金率
cc_matched_quantity: Option<String>组合CoverdCall的期权张数
spread_matched_quantity: Option<String>组合Spread的期权张数
straddle_matched_quantity: Option<String>组合Straddle的期权张数
position_ratio: Option<String>持仓占比 已弃用
mm: Option<String>维持保证金要求
last_mv: Option<String>昨日市值
cp_matched_quantity: Option<String>组合CoveredPut的期权张数或正股股数
strangle_matched_quantity: Option<String>组合Strangle的期权张数
last_profit: Option<String>使用夜盘价时 美股持仓在美东20-24点返回昨日盈亏 美股持仓非美东20-24点、非美股持仓,都不返回该字段
昨日盈亏
last_close_price: Option<String>昨收价
sub_account_id: Option<u64>使用账户协议SubAccount结构体中id字段(acc_info.proto)
liquidate_last: Option<u32>最后清算标记,组合暂不支持最后清算。取值枚举见【LIQUIDATE_LAST_STATE】
open_time: Option<u64>开仓时间(时间戳)
pstn_state: Option<PstnState>持仓状态,具体见PstnState
open_fill_id: Option<String>持仓的开仓成交id,对应aas_cmn.proto的real_open_fiil_id
business_position_id: Option<String>按成交维度存储的持仓id,对应aas_cmn.proto的position_id,目前用于客户端下单传给交易使用
yesterday_incomes: Option<String>100~199号段为基金专用
昨日收益
accumulated_incomes: Option<String>累计收益
是否支持分享
short_name: Option<String>基金短名称(用于分享页)
Implementations§
Source§impl AccPstnInfo
impl AccPstnInfo
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 account_market(&self) -> u32
pub fn account_market(&self) -> u32
Returns the value of account_market, or the default value if account_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 diluted_cost(&self) -> &str
pub fn diluted_cost(&self) -> &str
Returns the value of diluted_cost, or the default value if diluted_cost is unset.
Sourcepub fn average_cost(&self) -> &str
pub fn average_cost(&self) -> &str
Returns the value of average_cost, or the default value if average_cost 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 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 diluted_profit_ratio(&self) -> &str
pub fn diluted_profit_ratio(&self) -> &str
Returns the value of diluted_profit_ratio, or the default value if diluted_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 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 currency(&self) -> u32
pub fn currency(&self) -> u32
Returns the value of currency, or the default value if currency 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 sub_pstn_num(&self) -> u32
pub fn sub_pstn_num(&self) -> u32
Returns the value of sub_pstn_num, or the default value if sub_pstn_num is unset.
Sourcepub fn exchange_id(&self) -> u32
pub fn exchange_id(&self) -> u32
Returns the value of exchange_id, or the default value if exchange_id is unset.
Sourcepub fn from_combo(&self) -> &str
pub fn from_combo(&self) -> &str
Returns the value of from_combo, or the default value if from_combo 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.
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 average_profit_ratio(&self) -> &str
pub fn average_profit_ratio(&self) -> &str
Returns the value of average_profit_ratio, or the default value if average_profit_ratio is unset.
Sourcepub fn exchange(&self) -> &str
pub fn exchange(&self) -> &str
Returns the value of exchange, or the default value if exchange is unset.
Sourcepub fn underlying_stock_id(&self) -> &str
pub fn underlying_stock_id(&self) -> &str
Returns the value of underlying_stock_id, or the default value if underlying_stock_id is unset.
Sourcepub fn expiring_flag(&self) -> bool
pub fn expiring_flag(&self) -> bool
Returns the value of expiring_flag, or the default value if expiring_flag is unset.
Sourcepub fn proactive_qty(&self) -> &str
pub fn proactive_qty(&self) -> &str
Returns the value of proactive_qty, or the default value if proactive_qty is unset.
Sourcepub fn lapse_qty(&self) -> &str
pub fn lapse_qty(&self) -> &str
Returns the value of lapse_qty, or the default value if lapse_qty is unset.
Sourcepub fn in_the_money_depth(&self) -> f64
pub fn in_the_money_depth(&self) -> f64
Returns the value of in_the_money_depth, or the default value if in_the_money_depth is unset.
Sourcepub fn stock_id(&self) -> &str
pub fn stock_id(&self) -> &str
Returns the value of stock_id, or the default value if stock_id is unset.
Sourcepub fn stock_market(&self) -> u32
pub fn stock_market(&self) -> u32
Returns the value of stock_market, or the default value if stock_market is unset.
Sourcepub fn im_ratio(&self) -> &str
pub fn im_ratio(&self) -> &str
Returns the value of im_ratio, or the default value if im_ratio is unset.
Sourcepub fn mm_ratio(&self) -> &str
pub fn mm_ratio(&self) -> &str
Returns the value of mm_ratio, or the default value if mm_ratio is unset.
Sourcepub fn cc_matched_quantity(&self) -> &str
pub fn cc_matched_quantity(&self) -> &str
Returns the value of cc_matched_quantity, or the default value if cc_matched_quantity is unset.
Sourcepub fn spread_matched_quantity(&self) -> &str
pub fn spread_matched_quantity(&self) -> &str
Returns the value of spread_matched_quantity, or the default value if spread_matched_quantity is unset.
Sourcepub fn straddle_matched_quantity(&self) -> &str
pub fn straddle_matched_quantity(&self) -> &str
Returns the value of straddle_matched_quantity, or the default value if straddle_matched_quantity is unset.
Sourcepub fn position_ratio(&self) -> &str
pub fn position_ratio(&self) -> &str
Returns the value of position_ratio, or the default value if position_ratio is unset.
Sourcepub fn last_mv(&self) -> &str
pub fn last_mv(&self) -> &str
Returns the value of last_mv, or the default value if last_mv is unset.
Sourcepub fn cp_matched_quantity(&self) -> &str
pub fn cp_matched_quantity(&self) -> &str
Returns the value of cp_matched_quantity, or the default value if cp_matched_quantity is unset.
Sourcepub fn strangle_matched_quantity(&self) -> &str
pub fn strangle_matched_quantity(&self) -> &str
Returns the value of strangle_matched_quantity, or the default value if strangle_matched_quantity is unset.
Sourcepub fn last_profit(&self) -> &str
pub fn last_profit(&self) -> &str
Returns the value of last_profit, or the default value if last_profit is unset.
Sourcepub fn last_close_price(&self) -> &str
pub fn last_close_price(&self) -> &str
Returns the value of last_close_price, or the default value if last_close_price is unset.
Sourcepub fn sub_account_id(&self) -> u64
pub fn sub_account_id(&self) -> u64
Returns the value of sub_account_id, or the default value if sub_account_id is unset.
Sourcepub fn liquidate_last(&self) -> u32
pub fn liquidate_last(&self) -> u32
Returns the value of liquidate_last, or the default value if liquidate_last is unset.
Sourcepub fn open_time(&self) -> u64
pub fn open_time(&self) -> u64
Returns the value of open_time, or the default value if open_time is unset.
Sourcepub fn open_fill_id(&self) -> &str
pub fn open_fill_id(&self) -> &str
Returns the value of open_fill_id, or the default value if open_fill_id is unset.
Sourcepub fn business_position_id(&self) -> &str
pub fn business_position_id(&self) -> &str
Returns the value of business_position_id, or the default value if business_position_id is unset.
Sourcepub fn yesterday_incomes(&self) -> &str
pub fn yesterday_incomes(&self) -> &str
Returns the value of yesterday_incomes, or the default value if yesterday_incomes is unset.
Sourcepub fn accumulated_incomes(&self) -> &str
pub fn accumulated_incomes(&self) -> &str
Returns the value of accumulated_incomes, or the default value if accumulated_incomes is unset.
Returns the value of shareable, or the default value if shareable is unset.
Sourcepub fn short_name(&self) -> &str
pub fn short_name(&self) -> &str
Returns the value of short_name, or the default value if short_name is unset.
Trait Implementations§
Source§impl Clone for AccPstnInfo
impl Clone for AccPstnInfo
Source§fn clone(&self) -> AccPstnInfo
fn clone(&self) -> AccPstnInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccPstnInfo
impl Debug for AccPstnInfo
Source§impl Default for AccPstnInfo
impl Default for AccPstnInfo
Source§impl Message for AccPstnInfo
impl Message for AccPstnInfo
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.