Struct BybitOrderRequest

Source
pub struct BybitOrderRequest {
Show 17 fields pub symbol: String, pub side: OrderSide, pub order_type: OrderType, pub quantity: Decimal, pub price: Option<Decimal>, pub time_in_force: TimeInForce, pub category: BybitCategory, pub order_link_id: Option<String>, pub reduce_only: Option<bool>, pub close_on_trigger: Option<bool>, pub position_idx: Option<u32>, pub take_profit: Option<Decimal>, pub stop_loss: Option<Decimal>, pub tp_trigger_by: Option<String>, pub sl_trigger_by: Option<String>, pub tp_limit_price: Option<Decimal>, pub sl_limit_price: Option<Decimal>,
}
Expand description

Bybit WebSocket order request for individual orders

Fields§

§symbol: String

Trading symbol (e.g., “BTCUSDT”)

§side: OrderSide

Order side (Buy or Sell)

§order_type: OrderType

Order type (Market, Limit, etc.)

§quantity: Decimal

Order quantity

§price: Option<Decimal>

Order price (required for limit orders)

§time_in_force: TimeInForce

Time in force (GTC, IOC, FOK, etc.)

§category: BybitCategory

Bybit product category (spot, linear, inverse, options)

§order_link_id: Option<String>

Client-provided order link ID for tracking

§reduce_only: Option<bool>

Whether this is a reduce-only order

§close_on_trigger: Option<bool>

Whether to close position on trigger

§position_idx: Option<u32>

Position index for hedge mode (0=one-way, 1=buy-side, 2=sell-side)

§take_profit: Option<Decimal>

Take profit price

§stop_loss: Option<Decimal>

Stop loss price

§tp_trigger_by: Option<String>

Take profit trigger price type (LastPrice, MarkPrice, IndexPrice)

§sl_trigger_by: Option<String>

Stop loss trigger price type (LastPrice, MarkPrice, IndexPrice)

§tp_limit_price: Option<Decimal>

Take profit limit price for TP limit orders

§sl_limit_price: Option<Decimal>

Stop loss limit price for SL limit orders

Trait Implementations§

Source§

impl Clone for BybitOrderRequest

Source§

fn clone(&self) -> BybitOrderRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BybitOrderRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,