pub struct NotifyMsg {Show 14 fields
pub msg_header: Option<MsgHeader>,
pub notice_type: Option<u32>,
pub pstn_ids: Vec<String>,
pub order_ids: Vec<String>,
pub order_fill_ids: Vec<String>,
pub order_op_req_ids: Vec<String>,
pub exchange: Option<String>,
pub version: Option<u64>,
pub asset_category: Option<u32>,
pub err_code: Option<i32>,
pub orders: Vec<Order>,
pub order_fills: Vec<OrderFill>,
pub origin_request_result: Vec<RequsetResult>,
pub asset_change_data: Option<AssetChangeData>,
}Expand description
通知协议
Fields§
§msg_header: Option<MsgHeader>§notice_type: Option<u32>取值参考 NoticeType 定义
pstn_ids: Vec<String>notice_type 为 NOTICE_TYPE_PSTN_UPDATE 有效
order_ids: Vec<String>notice_type 为 NOTICE_TYPE_ORDER_UPDATE 有效
order_fill_ids: Vec<String>notice_type 为 NOTICE_TYPE_ORDER_FILL_UPDATE 有效
order_op_req_ids: Vec<String>notice_type 为 NOTICE_TYPE_ORDER_OP_RESULT 有效
exchange: Option<String>拉取变更时需要带过来,非空字符串则透传,其他(空 或 空串)不传
version: Option<u64>废弃,新接入的请使用assetchangedata中相关字段
asset_category: Option<u32>废弃,新接入的请使用assetchangedata中相关字段
err_code: Option<i32>下单失败错误码,notice_type 为 NOTICE_TYPE_ORDER_FAILED 有效
orders: Vec<Order>notice_type 为 NOTICE_TYPE_ORDER_NTF有效 (仅限高速通道)
order_fills: Vec<OrderFill>notice_type 为 NOTICE_TYPE_ORDER_FILL_NTF有效 (仅限高速通道)
origin_request_result: Vec<RequsetResult>notice_type 为 NOTICE_TYPE_ORDER_OP_RESULT_NTF有效 (仅限高速通道)
asset_change_data: Option<AssetChangeData>资产变更时需要携带变更相关的信息,notice_type=1、3、8、10、11时会携带
Implementations§
Source§impl NotifyMsg
impl NotifyMsg
Sourcepub fn notice_type(&self) -> u32
pub fn notice_type(&self) -> u32
Returns the value of notice_type, or the default value if notice_type 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 version(&self) -> u64
pub fn version(&self) -> u64
Returns the value of version, or the default value if version is unset.
Sourcepub fn asset_category(&self) -> u32
pub fn asset_category(&self) -> u32
Returns the value of asset_category, or the default value if asset_category is unset.
Trait Implementations§
Source§impl Message for NotifyMsg
impl Message for NotifyMsg
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.