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

source

pub fn new( symbol: &str, side: Side, type: &str, cancel_replace_mode: CancelReplaceMode ) -> Self

source

pub fn time_in_force(self, time_in_force: TimeInForce) -> Self

source

pub fn quantity(self, quantity: Decimal) -> Self

source

pub fn quote_order_qty(self, quote_order_qty: Decimal) -> Self

source

pub fn price(self, price: Decimal) -> Self

source

pub fn cancel_new_client_order_id( self, cancel_new_client_order_id: &str ) -> Self

source

pub fn cancel_orig_client_order_id( self, cancel_orig_client_order_id: &str ) -> Self

source

pub fn cancel_order_id(self, cancel_order_id: u64) -> Self

source

pub fn new_client_order_id(self, new_client_order_id: &str) -> Self

source

pub fn stop_price(self, stop_price: Decimal) -> Self

source

pub fn trailing_delta(self, trailing_delta: Decimal) -> Self

source

pub fn iceberg_qty(self, iceberg_qty: Decimal) -> Self

source

pub fn new_order_resp_type( self, new_order_resp_type: NewOrderResponseType ) -> Self

source

pub fn recv_window(self, recv_window: u64) -> Self

source

pub fn credentials(self, credentials: &Credentials) -> Self

Trait Implementations§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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