pub struct NewOrderParams {Show 13 fields
pub symbol: String,
pub side: BinanceSide,
pub order_type: BinanceSpotOrderType,
pub time_in_force: Option<BinanceTimeInForce>,
pub quantity: Option<String>,
pub quote_order_qty: Option<String>,
pub price: Option<String>,
pub new_client_order_id: Option<String>,
pub stop_price: Option<String>,
pub trailing_delta: Option<i64>,
pub iceberg_qty: Option<String>,
pub new_order_resp_type: Option<BinanceOrderResponseType>,
pub self_trade_prevention_mode: Option<BinanceSelfTradePreventionMode>,
}Expand description
Query parameters for new order submission.
Fields§
§symbol: StringTrading pair symbol.
side: BinanceSideOrder side (BUY or SELL).
order_type: BinanceSpotOrderTypeOrder type.
time_in_force: Option<BinanceTimeInForce>Time in force.
quantity: Option<String>Order quantity.
quote_order_qty: Option<String>Quote order quantity (for market orders).
price: Option<String>Limit price.
new_client_order_id: Option<String>Client order ID.
stop_price: Option<String>Stop price for stop orders.
trailing_delta: Option<i64>Trailing delta for trailing stop orders.
iceberg_qty: Option<String>Iceberg quantity.
new_order_resp_type: Option<BinanceOrderResponseType>Response type (ACK, RESULT, or FULL).
self_trade_prevention_mode: Option<BinanceSelfTradePreventionMode>Self-trade prevention mode.
Implementations§
Source§impl NewOrderParams
impl NewOrderParams
Sourcepub fn limit(
symbol: impl Into<String>,
side: BinanceSide,
quantity: impl Into<String>,
price: impl Into<String>,
) -> Self
pub fn limit( symbol: impl Into<String>, side: BinanceSide, quantity: impl Into<String>, price: impl Into<String>, ) -> Self
Create new order params for a limit order.
Sourcepub fn market(
symbol: impl Into<String>,
side: BinanceSide,
quantity: impl Into<String>,
) -> Self
pub fn market( symbol: impl Into<String>, side: BinanceSide, quantity: impl Into<String>, ) -> Self
Create new order params for a market order.
Sourcepub fn with_client_order_id(self, id: impl Into<String>) -> Self
pub fn with_client_order_id(self, id: impl Into<String>) -> Self
Set the client order ID.
Sourcepub fn with_time_in_force(self, tif: BinanceTimeInForce) -> Self
pub fn with_time_in_force(self, tif: BinanceTimeInForce) -> Self
Set the time in force.
Sourcepub fn with_stop_price(self, price: impl Into<String>) -> Self
pub fn with_stop_price(self, price: impl Into<String>) -> Self
Set the stop price.
Sourcepub fn with_stp_mode(self, mode: BinanceSelfTradePreventionMode) -> Self
pub fn with_stp_mode(self, mode: BinanceSelfTradePreventionMode) -> Self
Set the self-trade prevention mode.
Trait Implementations§
Source§impl Clone for NewOrderParams
impl Clone for NewOrderParams
Source§fn clone(&self) -> NewOrderParams
fn clone(&self) -> NewOrderParams
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 moreSource§impl Debug for NewOrderParams
impl Debug for NewOrderParams
Auto Trait Implementations§
impl Freeze for NewOrderParams
impl RefUnwindSafe for NewOrderParams
impl Send for NewOrderParams
impl Sync for NewOrderParams
impl Unpin for NewOrderParams
impl UnwindSafe for NewOrderParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more