pub struct PlaceOrderArgs {Show 15 fields
pub(crate) market: String,
pub(crate) acc_id: Option<u64>,
pub(crate) card_num: Option<String>,
pub(crate) env: String,
pub(crate) side: String,
pub(crate) order_type: String,
pub(crate) code: String,
pub(crate) qty: f64,
pub(crate) price: Option<f64>,
pub(crate) confirm: bool,
pub(crate) idempotency_key: Option<String>,
pub(crate) stop_price: Option<f64>,
pub(crate) trail_type: Option<i32>,
pub(crate) trail_value: Option<f64>,
pub(crate) trail_spread: Option<f64>,
}Fields§
§market: String§acc_id: Option<u64>§card_num: Option<String>App 显示卡号:4 位末尾或 16 位完整卡号
env: String交易环境(默认 simulate 防实盘误触)
side: String买卖方向: BUY | SELL | SELL_SHORT | BUY_BACK
order_type: String订单类型: NORMAL | MARKET | ABSOLUTE_LIMIT | AUCTION | AUCTION_LIMIT | SPECIAL_LIMIT
code: String股票代码(不含 market 前缀,如 00700 / AAPL)
qty: f64数量
price: Option<f64>价格(NORMAL 限价单必填,MARKET 可省)
confirm: boolreal env 必须显式加此 flag 才能下单
idempotency_key: Option<String>v1.4.39:可选幂等键。设置后,同一键在 90s 内重试返 cached 响应不
重复下单(对齐 REST Idempotency-Key header 语义)。不设置则每次调
用都真实下单。例:--idempotency-key my-order-2026-04-20-a
stop_price: Option<f64>v1.4.53 条件单:止损/止盈触发价(仅对 STOP / STOP_LIMIT / MIT /
LIT / TRAILING_STOP / TRAILING_STOP_LIMIT 生效)。对齐 FTAPI auxPrice
trail_type: Option<i32>v1.4.53 条件单:跟踪类型 1=Ratio(比例)/ 2=Amount(金额)
trail_value: Option<f64>v1.4.53 条件单:跟踪金额 / 百分比(TrailType=1 时为百分比)
trail_spread: Option<f64>v1.4.53 条件单:指定价差(跟踪限价单用)
Trait Implementations§
Source§impl Args for PlaceOrderArgs
impl Args for PlaceOrderArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for PlaceOrderArgs
impl FromArgMatches for PlaceOrderArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for PlaceOrderArgs
impl RefUnwindSafe for PlaceOrderArgs
impl Send for PlaceOrderArgs
impl Sync for PlaceOrderArgs
impl Unpin for PlaceOrderArgs
impl UnsafeUnpin for PlaceOrderArgs
impl UnwindSafe for PlaceOrderArgs
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
Mutably borrows from an owned value. Read more