pub struct ProtoOaOrder {Show 23 fields
pub order_id: i64,
pub trade_data: ProtoOaTradeData,
pub order_type: i32,
pub order_status: i32,
pub expiration_timestamp: Option<i64>,
pub execution_price: Option<f64>,
pub executed_volume: Option<i64>,
pub utc_last_update_timestamp: Option<i64>,
pub base_slippage_price: Option<f64>,
pub slippage_in_points: Option<i64>,
pub closing_order: Option<bool>,
pub limit_price: Option<f64>,
pub stop_price: Option<f64>,
pub stop_loss: Option<f64>,
pub take_profit: Option<f64>,
pub client_order_id: Option<String>,
pub time_in_force: Option<i32>,
pub position_id: Option<i64>,
pub relative_stop_loss: Option<i64>,
pub relative_take_profit: Option<i64>,
pub is_stop_out: Option<bool>,
pub trailing_stop_loss: Option<bool>,
pub stop_trigger_method: Option<i32>,
}Expand description
- Trade order entity.
Fields§
§order_id: i64The unique ID of the order. Note: trader might have two orders with the same id if orders are taken from accounts from different brokers.
trade_data: ProtoOaTradeDataDetailed trader data.
order_type: i32Order type.
order_status: i32Order status.
expiration_timestamp: Option<i64>The Unix time in milliseconds of expiration if the order has time in force GTD.
execution_price: Option<f64>Price at which an order was executed. For order with FILLED status.
executed_volume: Option<i64>Part of the volume that was filled in cents (e.g. 1000 in protocol means 10.00 units).
utc_last_update_timestamp: Option<i64>The Unix time in milliseconds of the last update of the order.
base_slippage_price: Option<f64>Used for Market Range order with combination of slippageInPoints to specify price range were order can be executed.
slippage_in_points: Option<i64>Used for Market Range and STOP_LIMIT orders to to specify price range were order can be executed.
closing_order: Option<bool>If TRUE then the order is closing part of whole position. Must have specified positionId.
limit_price: Option<f64>Valid only for LIMIT orders.
stop_price: Option<f64>Valid only for STOP and STOP_LIMIT orders.
stop_loss: Option<f64>Absolute stopLoss price.
take_profit: Option<f64>Absolute takeProfit price.
client_order_id: Option<String>Optional ClientOrderId. Max Length = 50 chars.
time_in_force: Option<i32>Order’s time in force. Depends on order type.
position_id: Option<i64>ID of the position linked to the order (e.g. closing order, order that increase volume of a specific position, etc.).
relative_stop_loss: Option<i64>Relative stopLoss that can be specified instead of absolute as one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss.
relative_take_profit: Option<i64>Relative takeProfit that can be specified instead of absolute one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) ForBUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit.
is_stop_out: Option<bool>If TRUE then order was stopped out from server side.
trailing_stop_loss: Option<bool>If TRUE then order is trailingStopLoss. Valid for STOP_LOSS_TAKE_PROFIT order.
stop_trigger_method: Option<i32>Trigger method for the order. Valid only for STOP and STOP_LIMIT orders.
Implementations§
Source§impl ProtoOaOrder
impl ProtoOaOrder
Sourcepub fn order_type(&self) -> ProtoOaOrderType
pub fn order_type(&self) -> ProtoOaOrderType
Returns the enum value of order_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_order_type(&mut self, value: ProtoOaOrderType)
pub fn set_order_type(&mut self, value: ProtoOaOrderType)
Sets order_type to the provided enum value.
Sourcepub fn order_status(&self) -> ProtoOaOrderStatus
pub fn order_status(&self) -> ProtoOaOrderStatus
Returns the enum value of order_status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_order_status(&mut self, value: ProtoOaOrderStatus)
pub fn set_order_status(&mut self, value: ProtoOaOrderStatus)
Sets order_status to the provided enum value.
Sourcepub fn expiration_timestamp(&self) -> i64
pub fn expiration_timestamp(&self) -> i64
Returns the value of expiration_timestamp, or the default value if expiration_timestamp is unset.
Sourcepub fn execution_price(&self) -> f64
pub fn execution_price(&self) -> f64
Returns the value of execution_price, or the default value if execution_price is unset.
Sourcepub fn executed_volume(&self) -> i64
pub fn executed_volume(&self) -> i64
Returns the value of executed_volume, or the default value if executed_volume is unset.
Sourcepub fn utc_last_update_timestamp(&self) -> i64
pub fn utc_last_update_timestamp(&self) -> i64
Returns the value of utc_last_update_timestamp, or the default value if utc_last_update_timestamp is unset.
Sourcepub fn base_slippage_price(&self) -> f64
pub fn base_slippage_price(&self) -> f64
Returns the value of base_slippage_price, or the default value if base_slippage_price is unset.
Sourcepub fn slippage_in_points(&self) -> i64
pub fn slippage_in_points(&self) -> i64
Returns the value of slippage_in_points, or the default value if slippage_in_points is unset.
Sourcepub fn closing_order(&self) -> bool
pub fn closing_order(&self) -> bool
Returns the value of closing_order, or the default value if closing_order is unset.
Sourcepub fn limit_price(&self) -> f64
pub fn limit_price(&self) -> f64
Returns the value of limit_price, or the default value if limit_price is unset.
Sourcepub fn stop_price(&self) -> f64
pub fn stop_price(&self) -> f64
Returns the value of stop_price, or the default value if stop_price is unset.
Sourcepub fn stop_loss(&self) -> f64
pub fn stop_loss(&self) -> f64
Returns the value of stop_loss, or the default value if stop_loss is unset.
Sourcepub fn take_profit(&self) -> f64
pub fn take_profit(&self) -> f64
Returns the value of take_profit, or the default value if take_profit is unset.
Sourcepub fn client_order_id(&self) -> &str
pub fn client_order_id(&self) -> &str
Returns the value of client_order_id, or the default value if client_order_id is unset.
Sourcepub fn time_in_force(&self) -> ProtoOaTimeInForce
pub fn time_in_force(&self) -> ProtoOaTimeInForce
Returns the enum value of time_in_force, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_time_in_force(&mut self, value: ProtoOaTimeInForce)
pub fn set_time_in_force(&mut self, value: ProtoOaTimeInForce)
Sets time_in_force to the provided enum value.
Sourcepub fn position_id(&self) -> i64
pub fn position_id(&self) -> i64
Returns the value of position_id, or the default value if position_id is unset.
Sourcepub fn relative_stop_loss(&self) -> i64
pub fn relative_stop_loss(&self) -> i64
Returns the value of relative_stop_loss, or the default value if relative_stop_loss is unset.
Sourcepub fn relative_take_profit(&self) -> i64
pub fn relative_take_profit(&self) -> i64
Returns the value of relative_take_profit, or the default value if relative_take_profit is unset.
Sourcepub fn is_stop_out(&self) -> bool
pub fn is_stop_out(&self) -> bool
Returns the value of is_stop_out, or the default value if is_stop_out is unset.
Sourcepub fn trailing_stop_loss(&self) -> bool
pub fn trailing_stop_loss(&self) -> bool
Returns the value of trailing_stop_loss, or the default value if trailing_stop_loss is unset.
Sourcepub fn stop_trigger_method(&self) -> ProtoOaOrderTriggerMethod
pub fn stop_trigger_method(&self) -> ProtoOaOrderTriggerMethod
Returns the enum value of stop_trigger_method, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_stop_trigger_method(&mut self, value: ProtoOaOrderTriggerMethod)
pub fn set_stop_trigger_method(&mut self, value: ProtoOaOrderTriggerMethod)
Sets stop_trigger_method to the provided enum value.
Trait Implementations§
Source§impl Clone for ProtoOaOrder
impl Clone for ProtoOaOrder
Source§fn clone(&self) -> ProtoOaOrder
fn clone(&self) -> ProtoOaOrder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaOrder
impl Debug for ProtoOaOrder
Source§impl Default for ProtoOaOrder
impl Default for ProtoOaOrder
Source§impl<'de> Deserialize<'de> for ProtoOaOrder
impl<'de> Deserialize<'de> for ProtoOaOrder
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 ProtoOaOrder
impl Message for ProtoOaOrder
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.