pub struct OcoOrderBuilder { /* private fields */ }Expand description
Builder for creating OCO orders.
Implementations§
Source§impl OcoOrderBuilder
impl OcoOrderBuilder
Sourcepub fn new(
symbol: &str,
side: OrderSide,
quantity: &str,
price: &str,
stop_price: &str,
) -> Self
pub fn new( symbol: &str, side: OrderSide, quantity: &str, price: &str, stop_price: &str, ) -> Self
Create a new OCO order builder.
§Arguments
symbol- Trading pair symbolside- Order side (Buy or Sell)quantity- Order quantityprice- Limit order pricestop_price- Stop order trigger price
Sourcepub fn stop_limit_price(self, price: &str) -> Self
pub fn stop_limit_price(self, price: &str) -> Self
Set the stop limit price.
Sourcepub fn stop_limit_time_in_force(self, tif: TimeInForce) -> Self
pub fn stop_limit_time_in_force(self, tif: TimeInForce) -> Self
Set the stop limit time in force.
Sourcepub fn list_client_order_id(self, id: &str) -> Self
pub fn list_client_order_id(self, id: &str) -> Self
Set a custom list client order ID.
Sourcepub fn limit_client_order_id(self, id: &str) -> Self
pub fn limit_client_order_id(self, id: &str) -> Self
Set a custom limit client order ID.
Sourcepub fn stop_client_order_id(self, id: &str) -> Self
pub fn stop_client_order_id(self, id: &str) -> Self
Set a custom stop client order ID.
Sourcepub fn build(self) -> NewOcoOrder
pub fn build(self) -> NewOcoOrder
Build the OCO order.
Trait Implementations§
Source§impl Clone for OcoOrderBuilder
impl Clone for OcoOrderBuilder
Source§fn clone(&self) -> OcoOrderBuilder
fn clone(&self) -> OcoOrderBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OcoOrderBuilder
impl RefUnwindSafe for OcoOrderBuilder
impl Send for OcoOrderBuilder
impl Sync for OcoOrderBuilder
impl Unpin for OcoOrderBuilder
impl UnwindSafe for OcoOrderBuilder
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