Skip to main content

OrderConfirmContext

Struct OrderConfirmContext 

Source
pub struct OrderConfirmContext {
    pub backend_order_id: String,
    pub confirm_type: u32,
    pub exchange_code: u32,
    pub exchange: String,
    pub title: String,
    pub content: String,
    pub confirm_button_title: String,
    pub cancel_button_title: String,
    pub inserted_at_ms: u64,
}
Expand description

v1.4.106 codex 0226 F1+F2: PlaceOrder 阶段 backend 返回 OrderNewRsp.action (CltAction.type == ORDER_CONFIRM=5) 时, 携带 CltActionOrderConfirm 二次 确认上下文 — 客户端需把这些字段透传给 backend OrderConfirmReq (cmd 4728).

来源 (proto-internal/odr_sys_cmn.proto:883-893):

message CltActionOrderConfirm {
    optional string order_id = 1;             // 订单 id (= backend 真实
                                               //  szOrderID, alphanumeric)
    optional string title = 2;                // 弹窗标题文案
    optional string content = 3;              // 弹窗内容文案
    optional string confirm_button_title = 4;
    optional string cancel_button_title = 5;
    optional uint32 confirm_type = 6;         // 必传给 OrderConfirmReq
    optional uint32 exchange_code = 7;        // 期货上游交易所代码
    optional string exchange = 8;             // 股票所属交易所
}

daemon 在 PlaceOrder ack 路径里 capture 此 context, 然后在 Trd_ReconfirmOrder 收到客户端确认请求时按 (acc_id, ftapi_order_id) 取出来 构造 backend OrderConfirmReq. 缺 context = backend 不需要二次确认 (e.g. HK 高买低卖未触发 / sim 路径) → ReconfirmOrder handler 早 reject loud.

来源 cmd_id: CS_CMDID_TRADE_ORDER_CONFIRM_ORDER = 4728 (moomoo/Moomoo/Include/FTTrade/TradeCmdDefine.h:132).

Fields§

§backend_order_id: String

backend 真实 szOrderID (alphanumeric); 写到 OrderConfirmReq.order_id.

§confirm_type: u32

CltActionOrderConfirm.confirm_type (来自 OrderConfirmType enum). 必传 (backend 用此值校验客户端确实看到了对应弹窗).

§exchange_code: u32

CltActionOrderConfirm.exchange_code (期货必传).

§exchange: String

CltActionOrderConfirm.exchange (股票必传).

§title: String

弹窗 title (用于 daemon 日志, 客户端可参考).

§content: String

弹窗 content (用于 daemon 日志, 客户端可参考).

§confirm_button_title: String

confirm_button / cancel_button title 透传 (UX, 不影响 backend).

§cancel_button_title: String§inserted_at_ms: u64

写入时间 (unix epoch ms), TTL 用. PlaceOrder 与 ReconfirmOrder 之间通常 <60s, 远超 60s 视为 stale → handler 拒绝.

Trait Implementations§

Source§

impl Clone for OrderConfirmContext

Source§

fn clone(&self) -> OrderConfirmContext

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for OrderConfirmContext

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for OrderConfirmContext

Source§

fn default() -> OrderConfirmContext

Returns the “default value” for a type. Read more
Source§

impl Eq for OrderConfirmContext

Source§

impl Hash for OrderConfirmContext

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for OrderConfirmContext

Source§

fn eq(&self, other: &OrderConfirmContext) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for OrderConfirmContext

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
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<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