pub struct ProtoOaClosePositionDetail {
pub entry_price: f64,
pub gross_profit: i64,
pub swap: i64,
pub commission: i64,
pub balance: i64,
pub quote_to_deposit_conversion_rate: Option<f64>,
pub closed_volume: Option<i64>,
pub balance_version: Option<i64>,
pub money_digits: Option<u32>,
pub pnl_conversion_fee: Option<i64>,
}Expand description
- Trading details for closing deal.
Fields§
§entry_price: f64Position price at the moment of filling the closing order.
gross_profit: i64Amount of realized gross profit after closing deal execution.
swap: i64Amount of realized swap related to closed volume.
commission: i64Amount of realized commission related to closed volume.
balance: i64Account balance after closing deal execution.
quote_to_deposit_conversion_rate: Option<f64>Quote/Deposit currency conversion rate on the time of closing deal execution.
closed_volume: Option<i64>Closed volume in cents.
balance_version: Option<i64>Balance version of the account related to closing deal operation.
money_digits: Option<u32>Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects grossProfit, swap, commission, balance, pnlConversionFee.
pnl_conversion_fee: Option<i64>Fee for conversion applied to the Deal in account’s ccy when trader symbol’s quote asset id <> ProtoOATrader.depositAssetId.
Implementations§
Source§impl ProtoOaClosePositionDetail
impl ProtoOaClosePositionDetail
Sourcepub fn quote_to_deposit_conversion_rate(&self) -> f64
pub fn quote_to_deposit_conversion_rate(&self) -> f64
Returns the value of quote_to_deposit_conversion_rate, or the default value if quote_to_deposit_conversion_rate is unset.
Sourcepub fn closed_volume(&self) -> i64
pub fn closed_volume(&self) -> i64
Returns the value of closed_volume, or the default value if closed_volume is unset.
Sourcepub fn balance_version(&self) -> i64
pub fn balance_version(&self) -> i64
Returns the value of balance_version, or the default value if balance_version is unset.
Sourcepub fn money_digits(&self) -> u32
pub fn money_digits(&self) -> u32
Returns the value of money_digits, or the default value if money_digits is unset.
Sourcepub fn pnl_conversion_fee(&self) -> i64
pub fn pnl_conversion_fee(&self) -> i64
Returns the value of pnl_conversion_fee, or the default value if pnl_conversion_fee is unset.
Trait Implementations§
Source§impl Clone for ProtoOaClosePositionDetail
impl Clone for ProtoOaClosePositionDetail
Source§fn clone(&self) -> ProtoOaClosePositionDetail
fn clone(&self) -> ProtoOaClosePositionDetail
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaClosePositionDetail
impl Debug for ProtoOaClosePositionDetail
Source§impl Default for ProtoOaClosePositionDetail
impl Default for ProtoOaClosePositionDetail
Source§impl<'de> Deserialize<'de> for ProtoOaClosePositionDetail
impl<'de> Deserialize<'de> for ProtoOaClosePositionDetail
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 ProtoOaClosePositionDetail
impl Message for ProtoOaClosePositionDetail
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.