pub struct OrderBuilder { /* private fields */ }
Expand description
Builder for order parameters
Implementations§
Source§impl OrderBuilder
impl OrderBuilder
Sourcepub fn trading_symbol<S: Into<String>>(self, symbol: S) -> Self
pub fn trading_symbol<S: Into<String>>(self, symbol: S) -> Self
Set trading symbol
Sourcepub fn transaction_type(self, transaction_type: TransactionType) -> Self
pub fn transaction_type(self, transaction_type: TransactionType) -> Self
Set transaction type
Sourcepub fn order_type(self, order_type: OrderType) -> Self
pub fn order_type(self, order_type: OrderType) -> Self
Set order type
Sourcepub fn trigger_price(self, trigger_price: f64) -> Self
pub fn trigger_price(self, trigger_price: f64) -> Self
Set trigger price (for SL orders)
Sourcepub fn disclosed_quantity(self, disclosed_quantity: u32) -> Self
pub fn disclosed_quantity(self, disclosed_quantity: u32) -> Self
Set disclosed quantity
Sourcepub fn market_protection(self, market_protection: f64) -> Self
pub fn market_protection(self, market_protection: f64) -> Self
Set market protection
Sourcepub fn build(self) -> Result<OrderParams, String>
pub fn build(self) -> Result<OrderParams, String>
Build the order parameters
Trait Implementations§
Source§impl Clone for OrderBuilder
impl Clone for OrderBuilder
Source§fn clone(&self) -> OrderBuilder
fn clone(&self) -> OrderBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OrderBuilder
impl Debug for OrderBuilder
Auto Trait Implementations§
impl Freeze for OrderBuilder
impl RefUnwindSafe for OrderBuilder
impl Send for OrderBuilder
impl Sync for OrderBuilder
impl Unpin for OrderBuilder
impl UnwindSafe for OrderBuilder
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