pub struct BybitOrderRequestBuilder { /* private fields */ }Expand description
Builder for creating Bybit V5 order requests with conditional parameters Particularly useful for Stop/StopLimit orders that require trigger_price
Implementations§
Source§impl BybitOrderRequestBuilder
impl BybitOrderRequestBuilder
Sourcepub fn order_type(self, order_type: OrderType) -> Self
pub fn order_type(self, order_type: OrderType) -> Self
Set the order type
Sourcepub fn time_in_force(self, tif: TimeInForce) -> EMSResult<Self>
pub fn time_in_force(self, tif: TimeInForce) -> EMSResult<Self>
Set the time in force
Sourcepub fn client_order_id(self, id: &str) -> Self
pub fn client_order_id(self, id: &str) -> Self
Set the client order ID
Sourcepub fn trigger_price(self, price: Decimal) -> Self
pub fn trigger_price(self, price: Decimal) -> Self
Set the trigger price (required for Stop/StopLimit orders)
Sourcepub fn trigger_by(self, trigger_by: &str) -> Self
pub fn trigger_by(self, trigger_by: &str) -> Self
Set the trigger price type
Sourcepub const fn trigger_direction(self, direction: u8) -> Self
pub const fn trigger_direction(self, direction: u8) -> Self
Set the trigger direction
Sourcepub fn build(self) -> EMSResult<BybitOrderRequest>
pub fn build(self) -> EMSResult<BybitOrderRequest>
Build the order request
Trait Implementations§
Source§impl Debug for BybitOrderRequestBuilder
impl Debug for BybitOrderRequestBuilder
Auto Trait Implementations§
impl Freeze for BybitOrderRequestBuilder
impl RefUnwindSafe for BybitOrderRequestBuilder
impl Send for BybitOrderRequestBuilder
impl Sync for BybitOrderRequestBuilder
impl Unpin for BybitOrderRequestBuilder
impl UnwindSafe for BybitOrderRequestBuilder
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