pub struct PlaceOrderArgs {Show 23 fields
pub(crate) market: String,
pub(crate) acc_id: Option<u64>,
pub(crate) card_num: Option<String>,
pub(crate) acc_id_file: Option<PathBuf>,
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) amount: Option<f64>,
pub(crate) pred_side: Option<i32>,
pub(crate) time_in_force: Option<String>,
pub(crate) fill_outside_rth: bool,
pub(crate) session: Option<String>,
pub(crate) expire_time: Option<String>,
pub(crate) jp_acc_type: Option<i32>,
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 位完整卡号
acc_id_file: Option<PathBuf>Unix owner-only (exact mode 0600) account-id file; keeps the raw selector out of argv.
env: String交易环境(默认 simulate 防实盘误触)
side: String买卖方向: BUY | SELL | SELL_SHORT | BUY_BACK
order_type: String订单类型: NORMAL | MARKET | ABSOLUTE_LIMIT | AUCTION | AUCTION_LIMIT | SPECIAL_LIMIT; 16–19 协议已声明,但当前 PlaceOrder 不支持并会拒绝;TWAP/VWAP 算法订单尚未实现
code: String股票代码(不含 market 前缀,如 00700 / AAPL)
qty: f64数量
price: Option<f64>价格(NORMAL 限价单必填,MARKET 可省)
amount: Option<f64>Event Contract 金额单金额;仅 --market PREDICTION 有效
pred_side: Option<i32>Event Contract 预测方向:1=Yes,2=No;仅 --market PREDICTION 有效
time_in_force: Option<String>订单有效期限:DAY|GTC|IOC|GTD 或 0|1|2|3
fill_outside_rth: bool允许美股盘前/盘后成交(FTAPI fillOutsideRTH)
session: Option<String>美股订单时段:NONE|RTH|ETH|ALL|OVERNIGHT 或 0|1|2|3|4
expire_time: Option<String>GTD 到期日期 YYYY-MM-DD,仅在 –time-in-force GTD 时有效
jp_acc_type: Option<i32>JP 子账户类型(TrdHeader.jpAccType / TrdSubAccType)
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>
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
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>
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>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more