pub struct ProtoOaExecutionEvent {
pub payload_type: Option<i32>,
pub ctid_trader_account_id: i64,
pub execution_type: i32,
pub position: Option<ProtoOaPosition>,
pub order: Option<ProtoOaOrder>,
pub deal: Option<ProtoOaDeal>,
pub bonus_deposit_withdraw: Option<ProtoOaBonusDepositWithdraw>,
pub deposit_withdraw: Option<ProtoOaDepositWithdraw>,
pub error_code: Option<String>,
pub is_server_event: Option<bool>,
}Expand description
- Event that is sent following the successful order acceptance or execution by the server. Acts as response to the ProtoOANewOrderReq, ProtoOACancelOrderReq, ProtoOAAmendOrderReq, ProtoOAAmendPositionSLTPReq, ProtoOAClosePositionReq requests. Also, the event is sent when a Deposit/Withdrawal took place.
Fields§
§payload_type: Option<i32>§ctid_trader_account_id: i64Unique identifier of the trader’s account. Used to match responses to trader’s accounts.
execution_type: i32Type of the order operation. For example: ACCEPTED, FILLED, etc.
position: Option<ProtoOaPosition>Reference to the position linked with the execution
order: Option<ProtoOaOrder>Reference to the initial order.
deal: Option<ProtoOaDeal>Reference to the deal (execution).
bonus_deposit_withdraw: Option<ProtoOaBonusDepositWithdraw>Reference to the Bonus Deposit or Withdrawal operation.
deposit_withdraw: Option<ProtoOaDepositWithdraw>Reference to the Deposit or Withdrawal operation.
error_code: Option<String>The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode).
is_server_event: Option<bool>If TRUE then the event generated by the server logic instead of the trader’s request. (e.g. stop-out).
Implementations§
Source§impl ProtoOaExecutionEvent
impl ProtoOaExecutionEvent
Sourcepub fn payload_type(&self) -> ProtoOaPayloadType
pub fn payload_type(&self) -> ProtoOaPayloadType
Returns the enum value of payload_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_payload_type(&mut self, value: ProtoOaPayloadType)
pub fn set_payload_type(&mut self, value: ProtoOaPayloadType)
Sets payload_type to the provided enum value.
Sourcepub fn execution_type(&self) -> ProtoOaExecutionType
pub fn execution_type(&self) -> ProtoOaExecutionType
Returns the enum value of execution_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_execution_type(&mut self, value: ProtoOaExecutionType)
pub fn set_execution_type(&mut self, value: ProtoOaExecutionType)
Sets execution_type to the provided enum value.
Sourcepub fn error_code(&self) -> &str
pub fn error_code(&self) -> &str
Returns the value of error_code, or the default value if error_code is unset.
Sourcepub fn is_server_event(&self) -> bool
pub fn is_server_event(&self) -> bool
Returns the value of is_server_event, or the default value if is_server_event is unset.
Trait Implementations§
Source§impl Clone for ProtoOaExecutionEvent
impl Clone for ProtoOaExecutionEvent
Source§fn clone(&self) -> ProtoOaExecutionEvent
fn clone(&self) -> ProtoOaExecutionEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaExecutionEvent
impl Debug for ProtoOaExecutionEvent
Source§impl Default for ProtoOaExecutionEvent
impl Default for ProtoOaExecutionEvent
Source§impl<'de> Deserialize<'de> for ProtoOaExecutionEvent
impl<'de> Deserialize<'de> for ProtoOaExecutionEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for ProtoOaExecutionEvent
impl Message for ProtoOaExecutionEvent
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.