pub struct MarginNewOrder { /* private fields */ }
Expand description
POST /sapi/v1/margin/order
Post a new order for margin account.
Weight(UID): 6
Example
use binance_spot_connector_rust::margin;
use rust_decimal_macros::dec;
let request = margin::margin_new_order("BNBUSDT", "SELL", "MARKET").quantity(dec!(1.01)).price(dec!(10)).stop_price(dec!(20.01)).time_in_force("GTC");
Implementations§
source§impl MarginNewOrder
impl MarginNewOrder
pub fn new(symbol: &str, side: &str, type: &str) -> Self
pub fn is_isolated(self, is_isolated: bool) -> 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 stop_price(self, stop_price: Decimal) -> Self
pub fn new_client_order_id(self, new_client_order_id: &str) -> Self
pub fn iceberg_qty(self, iceberg_qty: Decimal) -> Self
pub fn new_order_resp_type(self, new_order_resp_type: &str) -> Self
pub fn side_effect_type(self, side_effect_type: &str) -> Self
pub fn time_in_force(self, time_in_force: &str) -> Self
pub fn recv_window(self, recv_window: u64) -> Self
pub fn credentials(self, credentials: &Credentials) -> Self
Trait Implementations§
source§impl From<MarginNewOrder> for Request
impl From<MarginNewOrder> for Request
source§fn from(request: MarginNewOrder) -> Request
fn from(request: MarginNewOrder) -> Request
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for MarginNewOrder
impl Send for MarginNewOrder
impl Sync for MarginNewOrder
impl Unpin for MarginNewOrder
impl UnwindSafe for MarginNewOrder
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