pub struct CancelReplaceOrderBuilder { /* private fields */ }Expand description
Builder for cancel-replace orders.
Implementations§
Source§impl CancelReplaceOrderBuilder
impl CancelReplaceOrderBuilder
Sourcepub fn new(
symbol: &str,
side: OrderSide,
order_type: OrderType,
cancel_replace_mode: CancelReplaceMode,
) -> Self
pub fn new( symbol: &str, side: OrderSide, order_type: OrderType, cancel_replace_mode: CancelReplaceMode, ) -> Self
Create a new cancel-replace order builder.
Sourcepub fn quote_quantity(self, quantity: &str) -> Self
pub fn quote_quantity(self, quantity: &str) -> Self
Set the quote order quantity.
Sourcepub fn stop_price(self, price: &str) -> Self
pub fn stop_price(self, price: &str) -> Self
Set the stop price.
Sourcepub fn time_in_force(self, tif: TimeInForce) -> Self
pub fn time_in_force(self, tif: TimeInForce) -> Self
Set the time in force.
Sourcepub fn cancel_new_client_order_id(self, id: &str) -> Self
pub fn cancel_new_client_order_id(self, id: &str) -> Self
Set a new client order ID for the cancel.
Sourcepub fn cancel_orig_client_order_id(self, id: &str) -> Self
pub fn cancel_orig_client_order_id(self, id: &str) -> Self
Set the original client order ID to cancel.
Sourcepub fn cancel_order_id(self, id: u64) -> Self
pub fn cancel_order_id(self, id: u64) -> Self
Set the order ID to cancel.
Sourcepub fn new_client_order_id(self, id: &str) -> Self
pub fn new_client_order_id(self, id: &str) -> Self
Set the new client order ID.
Sourcepub fn strategy_id(self, id: u64) -> Self
pub fn strategy_id(self, id: u64) -> Self
Set the strategy ID.
Sourcepub fn strategy_type(self, strategy_type: i32) -> Self
pub fn strategy_type(self, strategy_type: i32) -> Self
Set the strategy type.
Sourcepub fn trailing_delta(self, delta: u64) -> Self
pub fn trailing_delta(self, delta: u64) -> Self
Set the trailing delta.
Sourcepub fn iceberg_qty(self, qty: &str) -> Self
pub fn iceberg_qty(self, qty: &str) -> Self
Set the iceberg quantity.
Sourcepub fn response_type(self, resp_type: OrderResponseType) -> Self
pub fn response_type(self, resp_type: OrderResponseType) -> Self
Set the response type.
Sourcepub fn self_trade_prevention_mode(self, mode: &str) -> Self
pub fn self_trade_prevention_mode(self, mode: &str) -> Self
Set self-trade prevention mode.
Sourcepub fn cancel_restrictions(self, restrictions: CancelRestrictions) -> Self
pub fn cancel_restrictions(self, restrictions: CancelRestrictions) -> Self
Set cancel restrictions.
Sourcepub fn order_rate_limit_exceeded_mode(
self,
mode: OrderRateLimitExceededMode,
) -> Self
pub fn order_rate_limit_exceeded_mode( self, mode: OrderRateLimitExceededMode, ) -> Self
Set order rate limit exceeded mode.
Sourcepub fn peg_price_type(self, peg_price_type: &str) -> Self
pub fn peg_price_type(self, peg_price_type: &str) -> Self
Set pegged price type.
Sourcepub fn peg_offset_value(self, peg_offset_value: i32) -> Self
pub fn peg_offset_value(self, peg_offset_value: i32) -> Self
Set pegged offset value.
Sourcepub fn peg_offset_type(self, peg_offset_type: &str) -> Self
pub fn peg_offset_type(self, peg_offset_type: &str) -> Self
Set pegged offset type.
Sourcepub fn build(self) -> CancelReplaceOrder
pub fn build(self) -> CancelReplaceOrder
Build the cancel-replace order request.
Trait Implementations§
Source§impl Clone for CancelReplaceOrderBuilder
impl Clone for CancelReplaceOrderBuilder
Source§fn clone(&self) -> CancelReplaceOrderBuilder
fn clone(&self) -> CancelReplaceOrderBuilder
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 CancelReplaceOrderBuilder
impl RefUnwindSafe for CancelReplaceOrderBuilder
impl Send for CancelReplaceOrderBuilder
impl Sync for CancelReplaceOrderBuilder
impl Unpin for CancelReplaceOrderBuilder
impl UnwindSafe for CancelReplaceOrderBuilder
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