pub struct AmendAlgoOrderRequest<'a> { /* private fields */ }Expand description
Request body for POST /api/v5/trade/amend-algos.
Implementations§
Source§impl<'a> AmendAlgoOrderRequest<'a>
impl<'a> AmendAlgoOrderRequest<'a>
Sourcepub fn new(inst_id: impl Into<Cow<'a, str>>) -> Self
pub fn new(inst_id: impl Into<Cow<'a, str>>) -> Self
Create an amendment for an instrument; add an algo identifier next.
Sourcepub fn algo_id(self, value: impl Into<Cow<'a, str>>) -> Self
pub fn algo_id(self, value: impl Into<Cow<'a, str>>) -> Self
Identify the order by OKX algo ID.
Sourcepub fn client_algo_order_id(self, value: impl Into<Cow<'a, str>>) -> Self
pub fn client_algo_order_id(self, value: impl Into<Cow<'a, str>>) -> Self
Identify the order by client-supplied algo ID.
Sourcepub fn request_id(self, value: impl Into<Cow<'a, str>>) -> Self
pub fn request_id(self, value: impl Into<Cow<'a, str>>) -> Self
Set a client request ID of up to 32 ASCII alphanumeric characters.
Sourcepub fn take_profit(
self,
trigger_px: impl Into<Cow<'a, str>>,
order_px: impl Into<Cow<'a, str>>,
) -> Self
pub fn take_profit( self, trigger_px: impl Into<Cow<'a, str>>, order_px: impl Into<Cow<'a, str>>, ) -> Self
Amend take-profit prices.
Sourcepub fn take_profit_price_type(self, value: impl Into<Cow<'a, str>>) -> Self
pub fn take_profit_price_type(self, value: impl Into<Cow<'a, str>>) -> 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<Cow<'a, str>>,
order_px: impl Into<Cow<'a, str>>,
) -> Self
pub fn stop_loss( self, trigger_px: impl Into<Cow<'a, str>>, order_px: impl Into<Cow<'a, str>>, ) -> Self
Amend stop-loss prices.
Sourcepub fn stop_loss_price_type(self, value: impl Into<Cow<'a, str>>) -> Self
pub fn stop_loss_price_type(self, value: impl Into<Cow<'a, str>>) -> 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<'a> Clone for AmendAlgoOrderRequest<'a>
impl<'a> Clone for AmendAlgoOrderRequest<'a>
Source§fn clone(&self) -> AmendAlgoOrderRequest<'a>
fn clone(&self) -> AmendAlgoOrderRequest<'a>
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<'a> Debug for AmendAlgoOrderRequest<'a>
impl<'a> Debug for AmendAlgoOrderRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for AmendAlgoOrderRequest<'a>
impl<'a> RefUnwindSafe for AmendAlgoOrderRequest<'a>
impl<'a> Send for AmendAlgoOrderRequest<'a>
impl<'a> Sync for AmendAlgoOrderRequest<'a>
impl<'a> Unpin for AmendAlgoOrderRequest<'a>
impl<'a> UnsafeUnpin for AmendAlgoOrderRequest<'a>
impl<'a> UnwindSafe for AmendAlgoOrderRequest<'a>
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