pub struct UpdatePositionRequest {
pub guaranteed_stop: Option<bool>,
pub limit_level: Option<f64>,
pub stop_level: Option<f64>,
pub trailing_stop: Option<bool>,
pub trailing_stop_distance: Option<f64>,
pub trailing_stop_increment: Option<f64>,
}Expand description
Model for updating an existing position (PUT /positions/otc/{dealId})
§Constraints
- If
guaranteed_stopistrue, thenstop_levelmust be set - If
guaranteed_stopistrue, thentrailing_stopmust befalse - If
trailing_stopisfalse, then DO NOT settrailing_stop_distanceortrailing_stop_increment - If
trailing_stopistrue, thenguaranteed_stopmust befalse - If
trailing_stopistrue, thentrailing_stop_distance,trailing_stop_increment, andstop_levelmust be set
Fields§
§guaranteed_stop: Option<bool>True if a guaranteed stop is required
limit_level: Option<f64>New price level for take profit
stop_level: Option<f64>New price level for stop loss
trailing_stop: Option<bool>True if trailing stop is required
trailing_stop_distance: Option<f64>Distance for trailing stop in points
trailing_stop_increment: Option<f64>Trailing stop step increment in points
Trait Implementations§
Source§impl Clone for UpdatePositionRequest
impl Clone for UpdatePositionRequest
Source§fn clone(&self) -> UpdatePositionRequest
fn clone(&self) -> UpdatePositionRequest
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 UpdatePositionRequest
impl Debug for UpdatePositionRequest
Source§impl Default for UpdatePositionRequest
impl Default for UpdatePositionRequest
Source§fn default() -> UpdatePositionRequest
fn default() -> UpdatePositionRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UpdatePositionRequest
impl<'de> Deserialize<'de> for UpdatePositionRequest
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 UpdatePositionRequest
impl Display for UpdatePositionRequest
Auto Trait Implementations§
impl Freeze for UpdatePositionRequest
impl RefUnwindSafe for UpdatePositionRequest
impl Send for UpdatePositionRequest
impl Sync for UpdatePositionRequest
impl Unpin for UpdatePositionRequest
impl UnwindSafe for UpdatePositionRequest
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.