Struct OrderPostQuery

Source
pub struct OrderPostQuery {
Show 13 fields pub symbol: String, pub side: OrderSide, pub type: OrderType, pub time_in_force: Option<OrderTimeInForce>, pub quantity: Option<Decimal>, pub quote_order_qty: Option<Decimal>, pub price: Option<Decimal>, pub new_client_order_id: Option<String>, pub stop_price: Option<Decimal>, pub iceberg_qty: Option<Decimal>, pub new_order_resp_type: Option<Type>, pub recv_window: Option<i64>, pub timestamp: i64,
}
Expand description

The https://www.binance.com/api/v3/order POST request query.

Fields§

§symbol: String

The symbol name.

§side: OrderSide

The order side.

§type: OrderType

The order type.

§time_in_force: Option<OrderTimeInForce>

The order time-in-force.

§quantity: Option<Decimal>

The order quantity in the secondary asset.

§quote_order_qty: Option<Decimal>

The order quantity in the primary asset.

§price: Option<Decimal>

The order price. Required for limit orders.

§new_client_order_id: Option<String>

A unique id for the order. Automatically generated if not sent.

§stop_price: Option<Decimal>

Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.

§iceberg_qty: Option<Decimal>

The iceberg order quantity.

§new_order_resp_type: Option<Type>

Set the response JSON. ACK, RESULT, or FULL; MARKET and LIMIT order types default to FULL, all other orders default to ACK.

§recv_window: Option<i64>

The allowed time window between the request and response in milliseconds.

§timestamp: i64

The request time in milliseconds.

Implementations§

Source§

impl Query

Source

pub fn market( symbol: &str, side: OrderSide, quantity: Decimal, use_base_quantity: bool, ) -> Self

Creates a market order request.

Source

pub fn limit( symbol: &str, side: OrderSide, quantity: Decimal, price: Decimal, ) -> Self

Creates a limit order request.

Trait Implementations§

Source§

impl ToString for Query

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more

Auto Trait Implementations§

§

impl Freeze for Query

§

impl RefUnwindSafe for Query

§

impl Send for Query

§

impl Sync for Query

§

impl Unpin for Query

§

impl UnwindSafe for Query

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

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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

Source§

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.
Source§

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

Source§

type Err = <U as TryFrom<T>>::Err

Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>

Source§

impl<T> Typeable for T
where T: Any,

Source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.
Source§

impl<T> ErasedDestructor for T
where T: 'static,