pub struct ProtoOaTradeData {
pub symbol_id: i64,
pub volume: i64,
pub trade_side: i32,
pub open_timestamp: Option<i64>,
pub label: Option<String>,
pub guaranteed_stop_loss: Option<bool>,
pub comment: Option<String>,
pub measurement_units: Option<String>,
pub close_timestamp: Option<u64>,
}Expand description
- Position/order trading details entity.
Fields§
§symbol_id: i64The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
volume: i64Volume in cents (e.g. 1000 in protocol means 10.00 units).
trade_side: i32Buy, Sell.
open_timestamp: Option<i64>The Unix time in milliseconds when position was opened or order was created.
label: Option<String>Text label specified during order request.
guaranteed_stop_loss: Option<bool>If TRUE then position/order stop loss is guaranteedStopLoss.
comment: Option<String>User-specified comment.
measurement_units: Option<String>Specifies the units in which the Symbol is denominated.
close_timestamp: Option<u64>The Unix time in milliseconds when a Position was closed
Implementations§
Source§impl ProtoOaTradeData
impl ProtoOaTradeData
Sourcepub fn trade_side(&self) -> ProtoOaTradeSide
pub fn trade_side(&self) -> ProtoOaTradeSide
Returns the enum value of trade_side, or the default if the field is set to an invalid enum value.
Sourcepub fn set_trade_side(&mut self, value: ProtoOaTradeSide)
pub fn set_trade_side(&mut self, value: ProtoOaTradeSide)
Sets trade_side to the provided enum value.
Sourcepub fn open_timestamp(&self) -> i64
pub fn open_timestamp(&self) -> i64
Returns the value of open_timestamp, or the default value if open_timestamp is unset.
Sourcepub fn label(&self) -> &str
pub fn label(&self) -> &str
Returns the value of label, or the default value if label is unset.
Sourcepub fn guaranteed_stop_loss(&self) -> bool
pub fn guaranteed_stop_loss(&self) -> bool
Returns the value of guaranteed_stop_loss, or the default value if guaranteed_stop_loss is unset.
Sourcepub fn comment(&self) -> &str
pub fn comment(&self) -> &str
Returns the value of comment, or the default value if comment is unset.
Sourcepub fn measurement_units(&self) -> &str
pub fn measurement_units(&self) -> &str
Returns the value of measurement_units, or the default value if measurement_units is unset.
Sourcepub fn close_timestamp(&self) -> u64
pub fn close_timestamp(&self) -> u64
Returns the value of close_timestamp, or the default value if close_timestamp is unset.
Trait Implementations§
Source§impl Clone for ProtoOaTradeData
impl Clone for ProtoOaTradeData
Source§fn clone(&self) -> ProtoOaTradeData
fn clone(&self) -> ProtoOaTradeData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaTradeData
impl Debug for ProtoOaTradeData
Source§impl Default for ProtoOaTradeData
impl Default for ProtoOaTradeData
Source§impl<'de> Deserialize<'de> for ProtoOaTradeData
impl<'de> Deserialize<'de> for ProtoOaTradeData
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 Hash for ProtoOaTradeData
impl Hash for ProtoOaTradeData
Source§impl Message for ProtoOaTradeData
impl Message for ProtoOaTradeData
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 ProtoOaTradeData
impl PartialEq for ProtoOaTradeData
Source§impl Serialize for ProtoOaTradeData
impl Serialize for ProtoOaTradeData
impl Eq for ProtoOaTradeData
impl StructuralPartialEq for ProtoOaTradeData
Auto Trait Implementations§
impl Freeze for ProtoOaTradeData
impl RefUnwindSafe for ProtoOaTradeData
impl Send for ProtoOaTradeData
impl Sync for ProtoOaTradeData
impl Unpin for ProtoOaTradeData
impl UnwindSafe for ProtoOaTradeData
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.