Struct bybit::model::OrderRequest
source · pub struct OrderRequest<'a> {Show 29 fields
pub category: Category,
pub symbol: Cow<'a, str>,
pub is_leverage: Option<bool>,
pub side: Side,
pub order_type: OrderType,
pub qty: f64,
pub market_unit: Option<f64>,
pub price: Option<f64>,
pub trigger_direction: Option<bool>,
pub order_filter: Option<Cow<'a, str>>,
pub trigger_price: Option<f64>,
pub trigger_by: Option<Cow<'a, str>>,
pub order_iv: Option<f64>,
pub time_in_force: Option<Cow<'a, str>>,
pub position_idx: Option<u8>,
pub order_link_id: Option<Cow<'a, str>>,
pub take_profit: Option<f64>,
pub stop_loss: Option<f64>,
pub tp_trigger_by: Option<Cow<'a, str>>,
pub sl_trigger_by: Option<Cow<'a, str>>,
pub reduce_only: Option<bool>,
pub close_on_trigger: Option<bool>,
pub smp_type: Option<Cow<'a, str>>,
pub mmp: Option<bool>,
pub tpsl_mode: Option<Cow<'a, str>>,
pub tp_limit_price: Option<f64>,
pub sl_limit_price: Option<f64>,
pub tp_order_type: Option<Cow<'a, str>>,
pub sl_order_type: Option<Cow<'a, str>>,
}Fields§
§category: Category§symbol: Cow<'a, str>§is_leverage: Option<bool>§side: Side§order_type: OrderType§qty: f64§market_unit: Option<f64>§price: Option<f64>§trigger_direction: Option<bool>§order_filter: Option<Cow<'a, str>>§trigger_price: Option<f64>§trigger_by: Option<Cow<'a, str>>§order_iv: Option<f64>§time_in_force: Option<Cow<'a, str>>§position_idx: Option<u8>§order_link_id: Option<Cow<'a, str>>§take_profit: Option<f64>§stop_loss: Option<f64>§tp_trigger_by: Option<Cow<'a, str>>§sl_trigger_by: Option<Cow<'a, str>>§reduce_only: Option<bool>§close_on_trigger: Option<bool>§smp_type: Option<Cow<'a, str>>§mmp: Option<bool>§tpsl_mode: Option<Cow<'a, str>>§tp_limit_price: Option<f64>§sl_limit_price: Option<f64>§tp_order_type: Option<Cow<'a, str>>§sl_order_type: Option<Cow<'a, str>>Implementations§
source§impl<'a> OrderRequest<'a>
impl<'a> OrderRequest<'a>
pub fn default() -> Self
pub fn custom( category: Category, symbol: &'a str, leverage: Option<bool>, side: Side, order_type: OrderType, qty: f64, market_unit: Option<f64>, price: Option<f64>, trigger_direction: Option<bool>, order_filter: Option<&'a str>, trigger_price: Option<f64>, trigger_by: Option<&'a str>, order_iv: Option<f64>, time_in_force: Option<&'a str>, position_idx: Option<u8>, order_link_id: Option<&'a str>, take_profit: Option<f64>, stop_loss: Option<f64>, tp_trigger_by: Option<&'a str>, sl_trigger_by: Option<&'a str>, reduce_only: Option<bool>, close_on_trigger: Option<bool>, smp_type: Option<&'a str>, mmp: Option<bool>, tpsl_mode: Option<&'a str>, tp_limit_price: Option<f64>, sl_limit_price: Option<f64>, tp_order_type: Option<&'a str>, sl_order_type: Option<&'a str>, ) -> Self
pub fn spot_limit_with_market_tpsl( symbol: &'a str, side: Side, qty: f64, price: f64, tp: f64, sl: f64, ) -> Self
pub fn spot_limit_with_limit_tpsl( symbol: &'a str, side: Side, qty: f64, price: f64, tp: f64, sl: f64, ) -> Self
pub fn spot_postonly(symbol: &'a str, side: Side, qty: f64, price: f64) -> Self
pub fn spot_tpsl( symbol: &'a str, side: Side, price: f64, qty: f64, order_link_id: Option<&'a str>, ) -> Self
pub fn spot_margin(symbol: &'a str, side: Side, qty: f64, price: f64) -> Self
pub fn spot_market(symbol: &'a str, side: Side, qty: f64) -> Self
pub fn futures_limit_with_market_tpsl( symbol: &'a str, side: Side, qty: f64, price: f64, tp: f64, sl: f64, ) -> Self
pub fn futures_limit_with_limit_tpsl( symbol: &'a str, side: Side, qty: f64, price: f64, tp: f64, sl: f64, ) -> Self
pub fn futures_market(symbol: &'a str, side: Side, qty: f64) -> Self
pub fn futures_close_limit( symbol: &'a str, side: Side, qty: f64, price: f64, order_link_id: &'a str, ) -> Self
pub fn futures_market_close(symbol: &'a str, side: Side, qty: f64) -> Self
Trait Implementations§
source§impl<'a> Clone for OrderRequest<'a>
impl<'a> Clone for OrderRequest<'a>
source§fn clone(&self) -> OrderRequest<'a>
fn clone(&self) -> OrderRequest<'a>
Returns a copy 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<'a> Default for OrderRequest<'a>
impl<'a> Default for OrderRequest<'a>
source§fn default() -> OrderRequest<'a>
fn default() -> OrderRequest<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for OrderRequest<'a>
impl<'a> RefUnwindSafe for OrderRequest<'a>
impl<'a> Send for OrderRequest<'a>
impl<'a> Sync for OrderRequest<'a>
impl<'a> Unpin for OrderRequest<'a>
impl<'a> UnwindSafe for OrderRequest<'a>
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)