pub struct BracketGTTBuilder { /* private fields */ }
Expand description
Bracket GTT builder (combines stop-loss and target)
Implementations§
Source§impl BracketGTTBuilder
impl BracketGTTBuilder
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 stop_loss_price(self, price: f64) -> Self
pub fn stop_loss_price(self, price: f64) -> Self
Set stop-loss price
Sourcepub fn target_price(self, price: f64) -> Self
pub fn target_price(self, price: f64) -> Self
Set target price
Sourcepub fn current_price(self, price: f64) -> Self
pub fn current_price(self, price: f64) -> Self
Set current market price
Sourcepub fn build(self) -> Result<GTTCreateParams, String>
pub fn build(self) -> Result<GTTCreateParams, String>
Build bracket GTT (OCO - One Cancels Other)
Trait Implementations§
Source§impl Clone for BracketGTTBuilder
impl Clone for BracketGTTBuilder
Source§fn clone(&self) -> BracketGTTBuilder
fn clone(&self) -> BracketGTTBuilder
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 BracketGTTBuilder
impl Debug for BracketGTTBuilder
Auto Trait Implementations§
impl Freeze for BracketGTTBuilder
impl RefUnwindSafe for BracketGTTBuilder
impl Send for BracketGTTBuilder
impl Sync for BracketGTTBuilder
impl Unpin for BracketGTTBuilder
impl UnwindSafe for BracketGTTBuilder
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