#[non_exhaustive]pub struct CloseOrderAlgo {
pub algo_id: String,
pub sl_trigger_px: String,
pub sl_trigger_px_type: String,
pub tp_trigger_px: String,
pub tp_trigger_px_type: String,
pub close_fraction: String,
}Expand description
A close-order algo attached to a position.
Populated in PositionUpdate::close_order_algo when a close-position
algo order (placed with closeFraction=1) is associated with the position.
OKX docs: https://www.okx.com/docs-v5/en/#trading-account-websocket-positions-channel
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.algo_id: StringAlgo order ID.
sl_trigger_px: StringStop-loss trigger price.
sl_trigger_px_type: StringStop-loss trigger price type: last, index, or mark.
tp_trigger_px: StringTake-profit trigger price.
tp_trigger_px_type: StringTake-profit trigger price type: last, index, or mark.
close_fraction: StringFraction of the position to close when the algo is triggered (e.g. "0.6").
Trait Implementations§
Source§impl Clone for CloseOrderAlgo
impl Clone for CloseOrderAlgo
Source§fn clone(&self) -> CloseOrderAlgo
fn clone(&self) -> CloseOrderAlgo
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 CloseOrderAlgo
impl Debug for CloseOrderAlgo
Source§impl Default for CloseOrderAlgo
impl Default for CloseOrderAlgo
Source§fn default() -> CloseOrderAlgo
fn default() -> CloseOrderAlgo
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CloseOrderAlgo
impl<'de> Deserialize<'de> for CloseOrderAlgo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CloseOrderAlgo
impl RefUnwindSafe for CloseOrderAlgo
impl Send for CloseOrderAlgo
impl Sync for CloseOrderAlgo
impl Unpin for CloseOrderAlgo
impl UnsafeUnpin for CloseOrderAlgo
impl UnwindSafe for CloseOrderAlgo
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