pub struct CryptoOrder {Show 25 fields
pub order_id: Option<String>,
pub version: Option<u32>,
pub stock_id: Option<u64>,
pub symbol_pair: Option<SymbolPair>,
pub exchange: Option<String>,
pub side: Option<u32>,
pub order_qty: Option<String>,
pub price: Option<String>,
pub order_amount: Option<String>,
pub cum_qty: Option<String>,
pub avg_px: Option<String>,
pub fill_amount: Option<String>,
pub ord_type: Option<u32>,
pub time_in_force: Option<u32>,
pub create_time: Option<i64>,
pub update_time: Option<i64>,
pub ord_status: Option<u32>,
pub text: Option<String>,
pub order_show_id: Option<String>,
pub market: Option<u32>,
pub security_type: Option<u32>,
pub is_close: Option<bool>,
pub view_slice_type: Option<u32>,
pub creator_id: Option<u64>,
pub notice_action: Option<CryptoOrderNoticeAction>,
}Fields§
§order_id: Option<String>订单号, 生命周期内维持不变
version: Option<u32>订单版本号,供ctl判断order是否同步
stock_id: Option<u64>§symbol_pair: Option<SymbolPair>交易对信息
exchange: Option<String>交易所
side: Option<u32>详见公共协议cryptotrade_cmn的Side
order_qty: Option<String>订单数量
price: Option<String>订单价格
order_amount: Option<String>订单金额
cum_qty: Option<String>已成交数量
avg_px: Option<String>成交平均价格
fill_amount: Option<String>成交金额
ord_type: Option<u32>详见公共协议cryptotrade_cmn的CryptoOrderType
time_in_force: Option<u32>详见公共协议cryptotrade_cmn的TimeInForce
create_time: Option<i64>订单创建时间,微妙
update_time: Option<i64>订单更新时间,微妙
ord_status: Option<u32>详见公共协议cryptotrade_cmn的CryptoOrderStatus
text: Option<String>来自客户端, 最长100字节, server不根据此字段做任何逻辑, 只存储+校验
order_show_id: Option<String>客户端展示的订单id
market: Option<u32>详见公共协议cryptotrade_cmn的StockMarket
security_type: Option<u32>详见公共协议cryptotrade_cmn的SecurityType
is_close: Option<bool>订单是否已完结
view_slice_type: Option<u32>详见ViewSliceType
creator_id: Option<u64>下单人CID
notice_action: Option<CryptoOrderNoticeAction>订单通知动作
Implementations§
Source§impl CryptoOrder
impl CryptoOrder
Sourcepub fn order_id(&self) -> &str
pub fn order_id(&self) -> &str
Returns the value of order_id, or the default value if order_id is unset.
Sourcepub fn version(&self) -> u32
pub fn version(&self) -> u32
Returns the value of version, or the default value if version is unset.
Sourcepub fn stock_id(&self) -> u64
pub fn stock_id(&self) -> u64
Returns the value of stock_id, or the default value if stock_id is unset.
Sourcepub fn exchange(&self) -> &str
pub fn exchange(&self) -> &str
Returns the value of exchange, or the default value if exchange is unset.
Sourcepub fn order_qty(&self) -> &str
pub fn order_qty(&self) -> &str
Returns the value of order_qty, or the default value if order_qty is unset.
Sourcepub fn price(&self) -> &str
pub fn price(&self) -> &str
Returns the value of price, or the default value if price is unset.
Sourcepub fn order_amount(&self) -> &str
pub fn order_amount(&self) -> &str
Returns the value of order_amount, or the default value if order_amount is unset.
Sourcepub fn cum_qty(&self) -> &str
pub fn cum_qty(&self) -> &str
Returns the value of cum_qty, or the default value if cum_qty is unset.
Sourcepub fn avg_px(&self) -> &str
pub fn avg_px(&self) -> &str
Returns the value of avg_px, or the default value if avg_px is unset.
Sourcepub fn fill_amount(&self) -> &str
pub fn fill_amount(&self) -> &str
Returns the value of fill_amount, or the default value if fill_amount is unset.
Sourcepub fn ord_type(&self) -> u32
pub fn ord_type(&self) -> u32
Returns the value of ord_type, or the default value if ord_type is unset.
Sourcepub fn time_in_force(&self) -> u32
pub fn time_in_force(&self) -> u32
Returns the value of time_in_force, or the default value if time_in_force is unset.
Sourcepub fn create_time(&self) -> i64
pub fn create_time(&self) -> i64
Returns the value of create_time, or the default value if create_time is unset.
Sourcepub fn update_time(&self) -> i64
pub fn update_time(&self) -> i64
Returns the value of update_time, or the default value if update_time is unset.
Sourcepub fn ord_status(&self) -> u32
pub fn ord_status(&self) -> u32
Returns the value of ord_status, or the default value if ord_status is unset.
Sourcepub fn order_show_id(&self) -> &str
pub fn order_show_id(&self) -> &str
Returns the value of order_show_id, or the default value if order_show_id is unset.
Sourcepub fn market(&self) -> u32
pub fn market(&self) -> u32
Returns the value of market, or the default value if market is unset.
Sourcepub fn security_type(&self) -> u32
pub fn security_type(&self) -> u32
Returns the value of security_type, or the default value if security_type is unset.
Sourcepub fn is_close(&self) -> bool
pub fn is_close(&self) -> bool
Returns the value of is_close, or the default value if is_close is unset.
Sourcepub fn view_slice_type(&self) -> u32
pub fn view_slice_type(&self) -> u32
Returns the value of view_slice_type, or the default value if view_slice_type is unset.
Sourcepub fn creator_id(&self) -> u64
pub fn creator_id(&self) -> u64
Returns the value of creator_id, or the default value if creator_id is unset.
Trait Implementations§
Source§impl Clone for CryptoOrder
impl Clone for CryptoOrder
Source§fn clone(&self) -> CryptoOrder
fn clone(&self) -> CryptoOrder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CryptoOrder
impl Debug for CryptoOrder
Source§impl Default for CryptoOrder
impl Default for CryptoOrder
Source§impl Hash for CryptoOrder
impl Hash for CryptoOrder
Source§impl Message for CryptoOrder
impl Message for CryptoOrder
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for CryptoOrder
impl PartialEq for CryptoOrder
impl Eq for CryptoOrder
impl StructuralPartialEq for CryptoOrder
Auto Trait Implementations§
impl Freeze for CryptoOrder
impl RefUnwindSafe for CryptoOrder
impl Send for CryptoOrder
impl Sync for CryptoOrder
impl Unpin for CryptoOrder
impl UnsafeUnpin for CryptoOrder
impl UnwindSafe for CryptoOrder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.