Skip to main content

PlaceOrderParams

Struct PlaceOrderParams 

Source
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.PacketIDconn_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

Source§

fn clone(&self) -> PlaceOrderParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PlaceOrderParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more