pub struct PlaceOrderParams {Show 13 fields
pub header: TrdHeader,
pub trd_side: TrdSide,
pub order_type: OrderType,
pub code: String,
pub qty: f64,
pub price: Option<f64>,
pub adjust_price: Option<bool>,
pub adjust_side_and_limit: Option<f64>,
pub idempotency_key: Option<String>,
pub aux_price: Option<f64>,
pub trail_type: Option<i32>,
pub trail_value: Option<f64>,
pub trail_spread: Option<f64>,
}Expand description
下单参数
Fields§
§header: TrdHeader交易头(env + acc_id + market)
trd_side: TrdSide买卖方向
order_type: OrderType订单类型(限价 / 市价 / 竞价 / 止损 / …)
code: String证券代码
qty: f64下单数量
price: Option<f64>下单价(限价单必填;市价单可空)
adjust_price: Option<bool>价格调整开关(超出涨跌幅时是否自动调整到 limit 内)
adjust_side_and_limit: Option<f64>调整侧与幅度(配合 adjust_price,百分比范围内向内调整)
idempotency_key: Option<String>v1.4.39: 可选幂等键。设置后,place_order 会根据此键派生 Common.PacketID
的 conn_id(serial_no=0),使同一键的重试命中 daemon 端 90s TTL cache,
返回缓存结果而不真实下单。eli v1.4.38 报告发现 CLI/MCP 没接此机制 → 修。
aux_price: Option<f64>止损/止盈触发价(FTAPI auxPrice)。
trail_type: Option<i32>跟踪类型 1=Ratio(比例)/ 2=Amount(金额),对 Trailing 变种有效。
trail_value: Option<f64>跟踪金额 / 百分比(trail_type=1 时为百分比,trail_type=2 时为金额)。
trail_spread: Option<f64>指定价差(跟踪限价单 TrailingStopLimit 用)。
Trait Implementations§
Source§impl Clone for PlaceOrderParams
impl Clone for PlaceOrderParams
Source§fn clone(&self) -> PlaceOrderParams
fn clone(&self) -> PlaceOrderParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PlaceOrderParams
impl RefUnwindSafe for PlaceOrderParams
impl Send for PlaceOrderParams
impl Sync for PlaceOrderParams
impl Unpin for PlaceOrderParams
impl UnsafeUnpin for PlaceOrderParams
impl UnwindSafe for PlaceOrderParams
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