pub struct AmendAlgoOrderRequest { /* private fields */ }Expand description
Request body for POST /api/v5/trade/amend-algos.
Implementations§
Source§impl AmendAlgoOrderRequest
impl AmendAlgoOrderRequest
Sourcepub fn new(inst_id: impl Into<String>) -> Self
pub fn new(inst_id: impl Into<String>) -> Self
Create an amendment for an instrument; add an algo identifier next.
Sourcepub fn client_algo_order_id(self, value: impl Into<String>) -> Self
pub fn client_algo_order_id(self, value: impl Into<String>) -> Self
Identify the order by client-supplied algo ID.
Sourcepub fn request_id(self, value: impl Into<String>) -> Self
pub fn request_id(self, value: impl Into<String>) -> Self
Set a client request ID of up to 32 ASCII alphanumeric characters.
Sourcepub fn take_profit(
self,
trigger_px: impl Into<String>,
order_px: impl Into<String>,
) -> Self
pub fn take_profit( self, trigger_px: impl Into<String>, order_px: impl Into<String>, ) -> Self
Amend take-profit prices.
Sourcepub fn take_profit_price_type(self, value: impl Into<String>) -> Self
pub fn take_profit_price_type(self, value: impl Into<String>) -> Self
Set the amended take-profit trigger price source.
Sourcepub fn delete_take_profit(self) -> Self
pub fn delete_take_profit(self) -> Self
Delete the take-profit definition by sending the documented 0 sentinel.
Sourcepub fn stop_loss(
self,
trigger_px: impl Into<String>,
order_px: impl Into<String>,
) -> Self
pub fn stop_loss( self, trigger_px: impl Into<String>, order_px: impl Into<String>, ) -> Self
Amend stop-loss prices.
Sourcepub fn stop_loss_price_type(self, value: impl Into<String>) -> Self
pub fn stop_loss_price_type(self, value: impl Into<String>) -> Self
Set the amended stop-loss trigger price source.
Sourcepub fn delete_stop_loss(self) -> Self
pub fn delete_stop_loss(self) -> Self
Delete the stop-loss definition by sending the documented 0 sentinel.
Sourcepub fn cancel_on_fail(self, value: bool) -> Self
pub fn cancel_on_fail(self, value: bool) -> Self
Cancel the original order automatically when amendment fails.
Trait Implementations§
Source§impl Clone for AmendAlgoOrderRequest
impl Clone for AmendAlgoOrderRequest
Source§fn clone(&self) -> AmendAlgoOrderRequest
fn clone(&self) -> AmendAlgoOrderRequest
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 moreSource§impl Debug for AmendAlgoOrderRequest
impl Debug for AmendAlgoOrderRequest
Source§impl Serialize for AmendAlgoOrderRequest
impl Serialize for AmendAlgoOrderRequest
Auto Trait Implementations§
impl Freeze for AmendAlgoOrderRequest
impl RefUnwindSafe for AmendAlgoOrderRequest
impl Send for AmendAlgoOrderRequest
impl Sync for AmendAlgoOrderRequest
impl Unpin for AmendAlgoOrderRequest
impl UnsafeUnpin for AmendAlgoOrderRequest
impl UnwindSafe for AmendAlgoOrderRequest
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