pub struct DynamicOrderState {
pub id: Option<OrderID>,
pub trailing_stop_value: Option<Decimal>,
pub trigger_distance: Option<Decimal>,
pub is_trigger_distance_exact: Option<bool>,
}Expand description
The dynamic state of an Order. This is only relevant to TrailingStopLoss Orders, as no other Order type has dynamic state.
Fields§
§id: Option<OrderID>The Order’s ID.
trailing_stop_value: Option<Decimal>The Order’s calculated trailing stop value.
trigger_distance: Option<Decimal>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.
Trait Implementations§
Source§impl Clone for DynamicOrderState
impl Clone for DynamicOrderState
Source§impl Debug for DynamicOrderState
impl Debug for DynamicOrderState
Source§impl<'de> Deserialize<'de> for DynamicOrderState
impl<'de> Deserialize<'de> for DynamicOrderState
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 PartialEq for DynamicOrderState
impl PartialEq for DynamicOrderState
Source§impl Serialize for DynamicOrderState
impl Serialize for DynamicOrderState
impl StructuralPartialEq for DynamicOrderState
Auto Trait Implementations§
impl Freeze for DynamicOrderState
impl RefUnwindSafe for DynamicOrderState
impl Send for DynamicOrderState
impl Sync for DynamicOrderState
impl Unpin for DynamicOrderState
impl UnsafeUnpin for DynamicOrderState
impl UnwindSafe for DynamicOrderState
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
Mutably borrows from an owned value. Read more