pub struct CreateOrderRequest {Show 16 fields
pub symbol: String,
pub side: Side,
pub quantity: f64,
pub order_type: OrderType,
pub account_id: Option<String>,
pub expire_timestamp: Option<i64>,
pub guaranteed_stop_loss: Option<bool>,
pub leverage: Option<i32>,
pub price: Option<f64>,
pub profit_distance: Option<f64>,
pub recv_window: Option<u64>,
pub new_order_resp_type: Option<String>,
pub stop_distance: Option<f64>,
pub stop_loss: Option<f64>,
pub take_profit: Option<f64>,
pub trailing_stop_loss: Option<bool>,
}Fields§
§symbol: String§side: Side§quantity: f64§order_type: OrderType§account_id: Option<String>§expire_timestamp: Option<i64>§guaranteed_stop_loss: Option<bool>§leverage: Option<i32>§price: Option<f64>§profit_distance: Option<f64>§recv_window: Option<u64>§new_order_resp_type: Option<String>§stop_distance: Option<f64>§stop_loss: Option<f64>§take_profit: Option<f64>§trailing_stop_loss: Option<bool>Implementations§
Source§impl CreateOrderRequest
impl CreateOrderRequest
pub fn new( symbol: String, side: Side, quantity: f64, order_type: OrderType, ) -> Self
pub fn with_symbol(self, symbol: String) -> Self
pub fn with_side(self, side: Side) -> Self
pub fn with_quantity(self, quantity: f64) -> Self
pub fn with_order_type(self, order_type: OrderType) -> Self
pub fn with_account_id(self, account_id: Option<String>) -> Self
pub fn with_expire_timestamp(self, expire_timestamp: Option<i64>) -> Self
pub fn with_guaranteed_stop_loss( self, guaranteed_stop_loss: Option<bool>, ) -> Self
pub fn with_leverage(self, leverage: Option<i32>) -> Self
pub fn with_price(self, price: Option<f64>) -> Self
pub fn with_profit_distance(self, profit_distance: Option<f64>) -> Self
pub fn with_recv_window(self, recv_window: Option<u64>) -> Self
pub fn with_new_order_resp_type( self, new_order_resp_type: Option<String>, ) -> Self
pub fn with_stop_distance(self, stop_distance: Option<f64>) -> Self
pub fn with_stop_loss(self, stop_loss: Option<f64>) -> Self
pub fn with_take_profit(self, take_profit: Option<f64>) -> Self
pub fn with_trailing_stop_loss(self, trailing_stop_loss: Option<bool>) -> Self
pub fn fill_query<const N: usize>(self, query: &mut Query<N>)
Trait Implementations§
Source§impl Clone for CreateOrderRequest
impl Clone for CreateOrderRequest
Source§impl Debug for CreateOrderRequest
impl Debug for CreateOrderRequest
Source§impl<'de> Deserialize<'de> for CreateOrderRequest
impl<'de> Deserialize<'de> for CreateOrderRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CreateOrderRequest
impl PartialEq for CreateOrderRequest
Source§impl Serialize for CreateOrderRequest
impl Serialize for CreateOrderRequest
impl StructuralPartialEq for CreateOrderRequest
Auto Trait Implementations§
impl Freeze for CreateOrderRequest
impl RefUnwindSafe for CreateOrderRequest
impl Send for CreateOrderRequest
impl Sync for CreateOrderRequest
impl Unpin for CreateOrderRequest
impl UnsafeUnpin for CreateOrderRequest
impl UnwindSafe for CreateOrderRequest
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