Struct binance_spot_connector_rust::trade::cancel_an_existing_order_and_send_a_new_order::CancelAnExistingOrderAndSendANewOrder
source · pub struct CancelAnExistingOrderAndSendANewOrder { /* private fields */ }
Expand description
POST /api/v3/order/cancelReplace
Cancels an existing order and places a new order on the same symbol.
Filters are evaluated before the cancel order is placed.
If the new order placement is successfully sent to the engine, the order count will increase by 1.
Weight(IP): 1
Example
use binance_spot_connector_rust::trade::{self, order::{Side, TimeInForce, CancelReplaceMode}};
use rust_decimal_macros::dec;
let request = trade::cancel_an_existing_order_and_send_a_new_order("BNBUSDT", Side::Sell, "LIMIT", CancelReplaceMode::StopOnFailure).time_in_force(TimeInForce::Gtc).quantity(dec!(10.1)).price(dec!(295.92)).cancel_order_id(12).stop_price(dec!(20.01));
Implementations§
source§impl CancelAnExistingOrderAndSendANewOrder
impl CancelAnExistingOrderAndSendANewOrder
pub fn new( symbol: &str, side: Side, type: &str, cancel_replace_mode: CancelReplaceMode ) -> Self
pub fn time_in_force(self, time_in_force: TimeInForce) -> Self
pub fn quantity(self, quantity: Decimal) -> Self
pub fn quote_order_qty(self, quote_order_qty: Decimal) -> Self
pub fn price(self, price: Decimal) -> Self
pub fn cancel_new_client_order_id( self, cancel_new_client_order_id: &str ) -> Self
pub fn cancel_orig_client_order_id( self, cancel_orig_client_order_id: &str ) -> Self
pub fn cancel_order_id(self, cancel_order_id: u64) -> Self
pub fn new_client_order_id(self, new_client_order_id: &str) -> Self
pub fn stop_price(self, stop_price: Decimal) -> Self
pub fn trailing_delta(self, trailing_delta: Decimal) -> Self
pub fn iceberg_qty(self, iceberg_qty: Decimal) -> Self
pub fn new_order_resp_type( self, new_order_resp_type: NewOrderResponseType ) -> Self
pub fn recv_window(self, recv_window: u64) -> Self
pub fn credentials(self, credentials: &Credentials) -> Self
Trait Implementations§
source§impl From<CancelAnExistingOrderAndSendANewOrder> for Request
impl From<CancelAnExistingOrderAndSendANewOrder> for Request
source§fn from(request: CancelAnExistingOrderAndSendANewOrder) -> Request
fn from(request: CancelAnExistingOrderAndSendANewOrder) -> Request
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for CancelAnExistingOrderAndSendANewOrder
impl Send for CancelAnExistingOrderAndSendANewOrder
impl Sync for CancelAnExistingOrderAndSendANewOrder
impl Unpin for CancelAnExistingOrderAndSendANewOrder
impl UnwindSafe for CancelAnExistingOrderAndSendANewOrder
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