pub struct DynamicOrderState {
pub id: Option<i32>,
pub trailing_stop_value: Option<f64>,
pub trigger_distance: Option<f64>,
pub is_trigger_distance_exact: Option<bool>,
}Expand description
DynamicOrderState : The dynamic state of an Order. This is only relevant to TrailingStopLoss Orders, as no other Order type has dynamic state.
Fields§
§id: Option<i32>The Order’s ID.
trailing_stop_value: Option<f64>The Order’s calculated trailing stop value.
trigger_distance: Option<f64>The distance between the Trailing Stop Loss Order’s trailingStopValue and the current Market Price. This represents the distance (in price units) of the Order from a triggering price. If the distance could not be determined, this value will not be set.
is_trigger_distance_exact: Option<bool>True if an exact trigger distance could be calculated. If false, it means the provided trigger distance is a best estimate. If the distance could not be determined, this value will not be set.
Implementations§
Source§impl DynamicOrderState
impl DynamicOrderState
Sourcepub fn new() -> DynamicOrderState
pub fn new() -> DynamicOrderState
The dynamic state of an Order. This is only relevant to TrailingStopLoss Orders, as no other Order type has dynamic state.
Trait Implementations§
Source§impl Clone for DynamicOrderState
impl Clone for DynamicOrderState
Source§fn clone(&self) -> DynamicOrderState
fn clone(&self) -> DynamicOrderState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more