pub struct BybitNativeTpSlParams {
pub take_profit: Option<String>,
pub stop_loss: Option<String>,
pub tp_trigger_by: Option<BybitTriggerType>,
pub sl_trigger_by: Option<BybitTriggerType>,
pub tp_order_type: Option<BybitOrderType>,
pub sl_order_type: Option<BybitOrderType>,
pub tp_limit_price: Option<String>,
pub sl_limit_price: Option<String>,
pub tpsl_mode: Option<BybitTpSlMode>,
pub close_on_trigger: Option<bool>,
pub order_iv: Option<String>,
pub mmp: Option<bool>,
}Expand description
Native TP/SL and option-specific fields that map onto the POST /v5/order/create entry.
Bundled to keep the submit_order signature manageable, and to give the demo HTTP path
access to the same fields the mainnet WS path supports via
crate::websocket::messages::BybitWsPlaceOrderParams. All fields are optional; populated
fields are written onto the entry builder as-is. tpsl_mode defaults to Full upstream when
only take_profit / stop_loss are set without an explicit mode.
tp_trigger_price / sl_trigger_price are intentionally absent: the create-order entry does
not carry them (the mainnet WS Trade API does, via separate fields).
Fields§
§take_profit: Option<String>§stop_loss: Option<String>§tp_trigger_by: Option<BybitTriggerType>§sl_trigger_by: Option<BybitTriggerType>§tp_order_type: Option<BybitOrderType>§sl_order_type: Option<BybitOrderType>§tp_limit_price: Option<String>§sl_limit_price: Option<String>§tpsl_mode: Option<BybitTpSlMode>§close_on_trigger: Option<bool>§order_iv: Option<String>§mmp: Option<bool>Implementations§
Trait Implementations§
Source§impl Clone for BybitNativeTpSlParams
impl Clone for BybitNativeTpSlParams
Source§fn clone(&self) -> BybitNativeTpSlParams
fn clone(&self) -> BybitNativeTpSlParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BybitNativeTpSlParams
impl Debug for BybitNativeTpSlParams
Source§impl Default for BybitNativeTpSlParams
impl Default for BybitNativeTpSlParams
Source§fn default() -> BybitNativeTpSlParams
fn default() -> BybitNativeTpSlParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BybitNativeTpSlParams
impl RefUnwindSafe for BybitNativeTpSlParams
impl Send for BybitNativeTpSlParams
impl Sync for BybitNativeTpSlParams
impl Unpin for BybitNativeTpSlParams
impl UnsafeUnpin for BybitNativeTpSlParams
impl UnwindSafe for BybitNativeTpSlParams
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more