pub struct StopLossGTTBuilder { /* private fields */ }
Expand description
Stop-loss GTT builder
Implementations§
Source§impl StopLossGTTBuilder
impl StopLossGTTBuilder
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 (usually SELL for long positions, BUY for short positions)
Sourcepub fn trigger_price(self, price: f64) -> Self
pub fn trigger_price(self, price: f64) -> Self
Set trigger price (stop-loss level)
Sourcepub fn limit_price(self, price: f64) -> Self
pub fn limit_price(self, price: f64) -> Self
Set limit price (for SL-L orders)
Sourcepub fn current_price(self, price: f64) -> Self
pub fn current_price(self, price: f64) -> Self
Set current market price
Sourcepub fn build_market(self) -> Result<GTTCreateParams, String>
pub fn build_market(self) -> Result<GTTCreateParams, String>
Build stop-loss GTT with market order
Sourcepub fn build_limit(self) -> Result<GTTCreateParams, String>
pub fn build_limit(self) -> Result<GTTCreateParams, String>
Build stop-loss GTT with limit order
Trait Implementations§
Source§impl Clone for StopLossGTTBuilder
impl Clone for StopLossGTTBuilder
Source§fn clone(&self) -> StopLossGTTBuilder
fn clone(&self) -> StopLossGTTBuilder
Returns a duplicate 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 Debug for StopLossGTTBuilder
impl Debug for StopLossGTTBuilder
Auto Trait Implementations§
impl Freeze for StopLossGTTBuilder
impl RefUnwindSafe for StopLossGTTBuilder
impl Send for StopLossGTTBuilder
impl Sync for StopLossGTTBuilder
impl Unpin for StopLossGTTBuilder
impl UnwindSafe for StopLossGTTBuilder
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