pub struct PositionDetails {Show 15 fields
pub contract_size: f64,
pub created_date: String,
pub created_date_utc: String,
pub deal_id: String,
pub deal_reference: String,
pub direction: Direction,
pub limit_level: Option<f64>,
pub level: f64,
pub size: f64,
pub stop_level: Option<f64>,
pub trailing_step: Option<f64>,
pub trailing_stop_distance: Option<f64>,
pub currency: String,
pub controlled_risk: bool,
pub limited_risk_premium: Option<f64>,
}Expand description
Details of a position
Fields§
§contract_size: f64Size of one contract
created_date: StringDate and time when the position was created
created_date_utc: StringUTC date and time when the position was created
deal_id: StringUnique identifier for the deal
deal_reference: StringClient-generated reference for the deal
direction: DirectionDirection of the position (buy or sell)
limit_level: Option<f64>Price level for take profit
level: f64Opening price level of the position
size: f64Size/quantity of the position
stop_level: Option<f64>Price level for stop loss
trailing_step: Option<f64>Step size for trailing stop
trailing_stop_distance: Option<f64>Distance for trailing stop
currency: StringCurrency of the position
controlled_risk: boolWhether the position has controlled risk
Premium paid for limited risk
Trait Implementations§
Source§impl Add for PositionDetails
impl Add for PositionDetails
Source§type Output = PositionDetails
type Output = PositionDetails
The resulting type after applying the
+ operator.Source§fn add(self, other: PositionDetails) -> PositionDetails
fn add(self, other: PositionDetails) -> PositionDetails
Performs the
+ operation. Read moreSource§impl Clone for PositionDetails
impl Clone for PositionDetails
Source§fn clone(&self) -> PositionDetails
fn clone(&self) -> PositionDetails
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PositionDetails
impl Debug for PositionDetails
Source§impl<'de> Deserialize<'de> for PositionDetails
impl<'de> Deserialize<'de> for PositionDetails
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PositionDetails
impl Display for PositionDetails
Auto Trait Implementations§
impl Freeze for PositionDetails
impl RefUnwindSafe for PositionDetails
impl Send for PositionDetails
impl Sync for PositionDetails
impl Unpin for PositionDetails
impl UnwindSafe for PositionDetails
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.