pub struct PlaceOrderBuilder { /* private fields */ }Expand description
Builder for a validated PlaceOrder.
Implementations§
Source§impl PlaceOrderBuilder
impl PlaceOrderBuilder
Sourcepub const fn limit_price(self, limit_price: Decimal) -> Self
pub const fn limit_price(self, limit_price: Decimal) -> Self
Sets the optional limit price.
Sourcepub const fn stop_price(self, stop_price: Decimal) -> Self
pub const fn stop_price(self, stop_price: Decimal) -> Self
Sets the optional stop price.
Sourcepub const fn trail_price(self, trail_price: Decimal) -> Self
pub const fn trail_price(self, trail_price: Decimal) -> Self
Sets the optional trailing price.
Sourcepub fn custom_tag(self, custom_tag: impl Into<String>) -> Self
pub fn custom_tag(self, custom_tag: impl Into<String>) -> Self
Sets the optional caller tag, which must be unique within the account.
Sourcepub fn stop_loss_bracket(self, stop_loss_bracket: Bracket) -> Self
pub fn stop_loss_bracket(self, stop_loss_bracket: Bracket) -> Self
Sets the optional stop-loss bracket.
Sourcepub fn take_profit_bracket(self, take_profit_bracket: Bracket) -> Self
pub fn take_profit_bracket(self, take_profit_bracket: Bracket) -> Self
Sets the optional take-profit bracket.
Sourcepub fn build(self) -> Result<PlaceOrder, RequestValidationError>
pub fn build(self) -> Result<PlaceOrder, RequestValidationError>
Validates and builds the order-placement request.
§Errors
Returns an error when the order quantity is zero or negative, when its order type is undocumented for placement, or when its side code is unknown to this crate version.
Trait Implementations§
Source§impl Clone for PlaceOrderBuilder
impl Clone for PlaceOrderBuilder
Source§fn clone(&self) -> PlaceOrderBuilder
fn clone(&self) -> PlaceOrderBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PlaceOrderBuilder
impl RefUnwindSafe for PlaceOrderBuilder
impl Send for PlaceOrderBuilder
impl Sync for PlaceOrderBuilder
impl Unpin for PlaceOrderBuilder
impl UnsafeUnpin for PlaceOrderBuilder
impl UnwindSafe for PlaceOrderBuilder
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