pub struct ModifyOrderBuilder { /* private fields */ }Expand description
Builder for a validated ModifyOrder.
Implementations§
Source§impl ModifyOrderBuilder
impl ModifyOrderBuilder
Sourcepub const fn limit_price(self, limit_price: Decimal) -> Self
pub const fn limit_price(self, limit_price: Decimal) -> Self
Sets the replacement limit price.
Sourcepub const fn stop_price(self, stop_price: Decimal) -> Self
pub const fn stop_price(self, stop_price: Decimal) -> Self
Sets the replacement stop price.
Sourcepub const fn trail_price(self, trail_price: Decimal) -> Self
pub const fn trail_price(self, trail_price: Decimal) -> Self
Sets an absolute replacement price level for a trailing-stop order.
The provider recalculates the tick distance using its last traded price
at modification time. Tick alignment and quote availability are checked
by the provider, but modification has no maximum-distance check. Supplying
the distance from Order::trail_price can therefore be accepted with
an unintended trail. Omit this setter to leave the trail unchanged.
See the modification reference.
Sourcepub fn build(self) -> Result<ModifyOrder, RequestValidationError>
pub fn build(self) -> Result<ModifyOrder, RequestValidationError>
Validates and builds the order-modification request.
§Errors
Returns RequestValidationError::NonPositiveReplacementSize when a
replacement quantity is zero or negative, or
RequestValidationError::EmptyModification when no replacement value was
supplied.
Trait Implementations§
Source§impl Clone for ModifyOrderBuilder
impl Clone for ModifyOrderBuilder
Source§fn clone(&self) -> ModifyOrderBuilder
fn clone(&self) -> ModifyOrderBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more