pub enum StopKind {
StopMarket,
StopLimit {
limit_price: Price,
},
TakeProfit,
TrailingStop {
trail_distance: Price,
},
}Expand description
What kind of stop attachment an Order carries.
Opaque to the framework — the adapter is responsible for translating these into native exchange semantics (e.g. KuCoin futures stops vs Binance OCO orders vs Bybit conditional orders). Adapters that don’t support a given variant should reject the order with a clear error rather than silently ignoring the attachment.
Variants§
StopMarket
Trigger a market order at trigger_price.
StopLimit
Trigger a limit order at trigger_price, posted at limit_price.
TakeProfit
Take-profit market order at trigger_price.
TrailingStop
Trailing stop with the given trail distance in quote currency.
Trait Implementations§
impl Copy for StopKind
Source§impl<'de> Deserialize<'de> for StopKind
impl<'de> Deserialize<'de> for StopKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StopKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StopKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StopKind
impl Serialize for StopKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for StopKind
Auto Trait Implementations§
impl Freeze for StopKind
impl RefUnwindSafe for StopKind
impl Send for StopKind
impl Sync for StopKind
impl Unpin for StopKind
impl UnsafeUnpin for StopKind
impl UnwindSafe for StopKind
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