pub struct MaxTrdQtys {
pub max_cash_buy: f64,
pub max_cash_and_margin_buy: Option<f64>,
pub max_position_sell: f64,
pub max_sell_short: Option<f64>,
pub max_buy_back: Option<f64>,
pub long_required_im: Option<f64>,
pub short_required_im: Option<f64>,
pub session: Option<i32>,
}Expand description
最大可交易数量
Fields§
§max_cash_buy: f64因目前服务器实现的问题,卖空需要先卖掉持仓才能再卖空,是分开两步卖的,买回来同样是逆向两步;而看多的买是可以现金加融资一起一步买的,请注意这个差异
不使用融资,仅自己的现金最大可买整手股数,期货此字段值为0
max_cash_and_margin_buy: Option<f64>使用融资,自己的现金 + 融资资金总共的最大可买整手股数,期货不适用
max_position_sell: f64不使用融券(卖空),仅自己的持仓最大可卖整手股数
max_sell_short: Option<f64>使用融券(卖空),最大可卖空整手股数,不包括多仓,期货不适用
max_buy_back: Option<f64>卖空后,需要买回的最大整手股数。因为卖空后,必须先买回已卖空的股数,还掉股票,才能再继续买多。期货不适用
long_required_im: Option<f64>开多仓每张合约初始保证金。当前仅期货和期权适用(最低 FutuOpenD 版本要求:5.0.1310)
short_required_im: Option<f64>开空仓每张合约初始保证金。当前仅期货和期权适用(最低 FutuOpenD 版本要求:5.0.1310)
session: Option<i32>美股订单时段, 参见Common.Session的枚举定义(最低 FutuOpenD 版本要求:9.4.5408)
Implementations§
Source§impl MaxTrdQtys
impl MaxTrdQtys
Sourcepub fn max_cash_and_margin_buy(&self) -> f64
pub fn max_cash_and_margin_buy(&self) -> f64
Returns the value of max_cash_and_margin_buy, or the default value if max_cash_and_margin_buy is unset.
Sourcepub fn max_sell_short(&self) -> f64
pub fn max_sell_short(&self) -> f64
Returns the value of max_sell_short, or the default value if max_sell_short is unset.
Sourcepub fn max_buy_back(&self) -> f64
pub fn max_buy_back(&self) -> f64
Returns the value of max_buy_back, or the default value if max_buy_back is unset.
Sourcepub fn long_required_im(&self) -> f64
pub fn long_required_im(&self) -> f64
Returns the value of long_required_im, or the default value if long_required_im is unset.
Sourcepub fn short_required_im(&self) -> f64
pub fn short_required_im(&self) -> f64
Returns the value of short_required_im, or the default value if short_required_im is unset.
Trait Implementations§
Source§impl Clone for MaxTrdQtys
impl Clone for MaxTrdQtys
Source§fn clone(&self) -> MaxTrdQtys
fn clone(&self) -> MaxTrdQtys
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MaxTrdQtys
impl Debug for MaxTrdQtys
Source§impl Default for MaxTrdQtys
impl Default for MaxTrdQtys
Source§impl<'de> Deserialize<'de> for MaxTrdQtyswhere
MaxTrdQtys: Default,
impl<'de> Deserialize<'de> for MaxTrdQtyswhere
MaxTrdQtys: Default,
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 MaxTrdQtys
impl Message for MaxTrdQtys
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.