Skip to main content

Order

Struct Order 

Source
pub struct Order {
Show 60 fields pub side: Option<u32>, pub market: Option<u32>, pub symbol: Option<String>, pub stock_name: Option<String>, pub order_id: Option<String>, pub type: Option<u32>, pub qty: Option<String>, pub cum_qty: Option<String>, pub leave_qty: Option<String>, pub price: Option<String>, pub avg_fill_price: Option<String>, pub creator_id_type: Option<u32>, pub creator_id: Option<u64>, pub nn_uid: Option<u64>, pub intra_account_id: Option<u64>, pub last_err_msg: Option<String>, pub create_time: Option<u64>, pub update_time: Option<u64>, pub status: Option<u32>, pub lot_type: Option<u32>, pub version: Option<u32>, pub currency: Option<u32>, pub sup: Option<OrderSup>, pub expire_time: Option<u64>, pub text: Option<String>, pub client_type: Option<u32>, pub client_version: Option<u32>, pub last_err: Option<i32>, pub security_type: Option<u32>, pub dark_pool: Option<u32>, pub order_show_type: Option<u32>, pub exdestination: Option<u32>, pub notice_msg: Option<String>, pub trigger_info: Option<TriggerInfo>, pub ba_trade_notice_msg: Option<String>, pub exchange_code: Option<u32>, pub group_id: Option<String>, pub relation_type: Option<i32>, pub notice_action: Option<OrderNoticeAction>, pub aux_price: Option<String>, pub disable_auto_short: Option<bool>, pub exec_time: Option<u64>, pub price_type: Option<u32>, pub order_show_id: Option<String>, pub fill_amount: Option<String>, pub order_amount: Option<String>, pub input_source: Option<u32>, pub exchange: Option<String>, pub algo_info: Option<AlgoInfo>, pub parent_order_id: Option<String>, pub order_group_id: Option<String>, pub group_type: Option<u32>, pub account_market: Option<u32>, pub multi_leg_info: Option<MultiLegInfo>, pub batch_id: Option<String>, pub forex_addition: Option<ForexAddition>, pub fix_session_id: Option<String>, pub bond_info: Option<BondInfo>, pub third_party_bcan: Option<String>, pub sub_account: Option<u32>,
}

Fields§

§side: Option<u32>

取值参考 Side

§market: Option<u32>

取值参考 Market

§symbol: Option<String>§stock_name: Option<String>§order_id: Option<String>

订单号, 生命周期内维持不变

§type: Option<u32>

取值参考 OrderType

§qty: Option<String>§cum_qty: Option<String>

总已成交股数

§leave_qty: Option<String>§price: Option<String>§avg_fill_price: Option<String>§creator_id_type: Option<u32>

取值参考 CreatorIDType

§creator_id: Option<u64>§nn_uid: Option<u64>

该订单属于哪个牛牛号

§intra_account_id: Option<u64>

注意跟clt传给server的不同

§last_err_msg: Option<String>

废弃!!!使用notice_action返回信息展示

§create_time: Option<u64>

单位微秒

§update_time: Option<u64>

单位微秒

§status: Option<u32>

取值参考 OrderStatus

§lot_type: Option<u32>

取值参考 LotType

§version: Option<u32>

版本号, 用来判断clt跟server的order是否同步

§currency: Option<u32>

取值参考 Currency

§sup: Option<OrderSup>§expire_time: Option<u64>

真实订单过期时间戳(客户端暂时用不到这个,预留未来使用), 单位微秒

§text: Option<String>

可见字符, 最长100字节, server不根据此字段做任何逻辑, 只存储+校验

§client_type: Option<u32>

客户类型

§client_version: Option<u32>

客户版本

§last_err: Option<i32>

错误码

§security_type: Option<u32>

交易品种 取值参考SecurityType

§dark_pool: Option<u32>

暗盘类型,0:非暗盘 1:暗盘 else:暗盘

§order_show_type: Option<u32>

订单显示标识,客户端根据这个字段决定在哪个列表显示,取值参考OrderShowType

§exdestination: Option<u32>

上游券商 取值参考ExDestination

§notice_msg: Option<String>

废弃!!!使用notice_action返回信息展示

§trigger_info: Option<TriggerInfo>

废弃!!!

§ba_trade_notice_msg: Option<String>

美股允许盘前盘后提示

§exchange_code: Option<u32>

期货所属交易所代码

§group_id: Option<String>

订单组id(期货快捷交易专用)

§relation_type: Option<i32>

订单关系, 取值参考RelationType

§notice_action: Option<OrderNoticeAction>

订单状态提醒

§aux_price: Option<String>

止损价差

§disable_auto_short: Option<bool>

是否禁止转方向(卖单->卖空 or 买单转buyback)

§exec_time: Option<u64>

执行时间,触发时间,=0 表示监控中

§price_type: Option<u32>

对价或最新价格,取值参考 PriceType, 目前期货条件单平仓用到

§order_show_id: Option<String>

客户端展示的订单id

§fill_amount: Option<String>

成交额,拉取历史订单使用

§order_amount: Option<String>

订单金额

§input_source: Option<u32>

请求源,OrderQueryService使用,客户端用于判断属于普通订单或者行权/指派订单,取值参考InputSourceType

§exchange: Option<String>

股票所属交易所

§algo_info: Option<AlgoInfo>

算法参数信息

§parent_order_id: Option<String>

组订单父订单的order_id

§order_group_id: Option<String>

组订单的group_id

§group_type: Option<u32>

订单组类型,参考GroupType

§account_market: Option<u32>

全能账户所属市场为6,其余同market

§multi_leg_info: Option<MultiLegInfo>

多退订单组合信息

§batch_id: Option<String>

批次id

§forex_addition: Option<ForexAddition>

外汇订单字段

§fix_session_id: Option<String>§bond_info: Option<BondInfo>

债券相关信息

§third_party_bcan: Option<String>

外部券商bcan 格式[CE_ID].[NUMBER] xxxxxx.123

§sub_account: Option<u32>

【日本券商】口座, 见账户侧协议中Tags枚举(acc_info.proto)

Implementations§

Source§

impl Order

Source

pub fn side(&self) -> u32

Returns the value of side, or the default value if side is unset.

Source

pub fn market(&self) -> u32

Returns the value of market, or the default value if market is unset.

Source

pub fn symbol(&self) -> &str

Returns the value of symbol, or the default value if symbol is unset.

Source

pub fn stock_name(&self) -> &str

Returns the value of stock_name, or the default value if stock_name is unset.

Source

pub fn order_id(&self) -> &str

Returns the value of order_id, or the default value if order_id is unset.

Source

pub fn type(&self) -> u32

Returns the value of type, or the default value if type is unset.

Source

pub fn qty(&self) -> &str

Returns the value of qty, or the default value if qty is unset.

Source

pub fn cum_qty(&self) -> &str

Returns the value of cum_qty, or the default value if cum_qty is unset.

Source

pub fn leave_qty(&self) -> &str

Returns the value of leave_qty, or the default value if leave_qty is unset.

Source

pub fn price(&self) -> &str

Returns the value of price, or the default value if price is unset.

Source

pub fn avg_fill_price(&self) -> &str

Returns the value of avg_fill_price, or the default value if avg_fill_price is unset.

Source

pub fn creator_id_type(&self) -> u32

Returns the value of creator_id_type, or the default value if creator_id_type is unset.

Source

pub fn creator_id(&self) -> u64

Returns the value of creator_id, or the default value if creator_id is unset.

Source

pub fn nn_uid(&self) -> u64

Returns the value of nn_uid, or the default value if nn_uid is unset.

Source

pub fn intra_account_id(&self) -> u64

Returns the value of intra_account_id, or the default value if intra_account_id is unset.

Source

pub fn last_err_msg(&self) -> &str

Returns the value of last_err_msg, or the default value if last_err_msg is unset.

Source

pub fn create_time(&self) -> u64

Returns the value of create_time, or the default value if create_time is unset.

Source

pub fn update_time(&self) -> u64

Returns the value of update_time, or the default value if update_time is unset.

Source

pub fn status(&self) -> u32

Returns the value of status, or the default value if status is unset.

Source

pub fn lot_type(&self) -> u32

Returns the value of lot_type, or the default value if lot_type is unset.

Source

pub fn version(&self) -> u32

Returns the value of version, or the default value if version is unset.

Source

pub fn currency(&self) -> u32

Returns the value of currency, or the default value if currency is unset.

Source

pub fn expire_time(&self) -> u64

Returns the value of expire_time, or the default value if expire_time is unset.

Source

pub fn text(&self) -> &str

Returns the value of text, or the default value if text is unset.

Source

pub fn client_type(&self) -> u32

Returns the value of client_type, or the default value if client_type is unset.

Source

pub fn client_version(&self) -> u32

Returns the value of client_version, or the default value if client_version is unset.

Source

pub fn last_err(&self) -> i32

Returns the value of last_err, or the default value if last_err is unset.

Source

pub fn security_type(&self) -> u32

Returns the value of security_type, or the default value if security_type is unset.

Source

pub fn dark_pool(&self) -> u32

Returns the value of dark_pool, or the default value if dark_pool is unset.

Source

pub fn order_show_type(&self) -> u32

Returns the value of order_show_type, or the default value if order_show_type is unset.

Source

pub fn exdestination(&self) -> u32

Returns the value of exdestination, or the default value if exdestination is unset.

Source

pub fn notice_msg(&self) -> &str

Returns the value of notice_msg, or the default value if notice_msg is unset.

Source

pub fn ba_trade_notice_msg(&self) -> &str

Returns the value of ba_trade_notice_msg, or the default value if ba_trade_notice_msg is unset.

Source

pub fn exchange_code(&self) -> u32

Returns the value of exchange_code, or the default value if exchange_code is unset.

Source

pub fn group_id(&self) -> &str

Returns the value of group_id, or the default value if group_id is unset.

Source

pub fn relation_type(&self) -> i32

Returns the value of relation_type, or the default value if relation_type is unset.

Source

pub fn aux_price(&self) -> &str

Returns the value of aux_price, or the default value if aux_price is unset.

Source

pub fn disable_auto_short(&self) -> bool

Returns the value of disable_auto_short, or the default value if disable_auto_short is unset.

Source

pub fn exec_time(&self) -> u64

Returns the value of exec_time, or the default value if exec_time is unset.

Source

pub fn price_type(&self) -> u32

Returns the value of price_type, or the default value if price_type is unset.

Source

pub fn order_show_id(&self) -> &str

Returns the value of order_show_id, or the default value if order_show_id is unset.

Source

pub fn fill_amount(&self) -> &str

Returns the value of fill_amount, or the default value if fill_amount is unset.

Source

pub fn order_amount(&self) -> &str

Returns the value of order_amount, or the default value if order_amount is unset.

Source

pub fn input_source(&self) -> u32

Returns the value of input_source, or the default value if input_source is unset.

Source

pub fn exchange(&self) -> &str

Returns the value of exchange, or the default value if exchange is unset.

Source

pub fn parent_order_id(&self) -> &str

Returns the value of parent_order_id, or the default value if parent_order_id is unset.

Source

pub fn order_group_id(&self) -> &str

Returns the value of order_group_id, or the default value if order_group_id is unset.

Source

pub fn group_type(&self) -> u32

Returns the value of group_type, or the default value if group_type is unset.

Source

pub fn account_market(&self) -> u32

Returns the value of account_market, or the default value if account_market is unset.

Source

pub fn batch_id(&self) -> &str

Returns the value of batch_id, or the default value if batch_id is unset.

Source

pub fn fix_session_id(&self) -> &str

Returns the value of fix_session_id, or the default value if fix_session_id is unset.

Source

pub fn third_party_bcan(&self) -> &str

Returns the value of third_party_bcan, or the default value if third_party_bcan is unset.

Source

pub fn sub_account(&self) -> u32

Returns the value of sub_account, or the default value if sub_account is unset.

Trait Implementations§

Source§

impl Clone for Order

Source§

fn clone(&self) -> Order

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 Order

Source§

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

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

impl Default for Order

Source§

fn default() -> Self

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

impl Message for Order

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for Order

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Order

Auto Trait Implementations§

§

impl Freeze for Order

§

impl RefUnwindSafe for Order

§

impl Send for Order

§

impl Sync for Order

§

impl Unpin for Order

§

impl UnsafeUnpin for Order

§

impl UnwindSafe for Order

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.

§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: 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: 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<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