pub struct OKXAlgoOrderMsg {Show 39 fields
pub algo_id: String,
pub algo_cl_ord_id: String,
pub cl_ord_id: String,
pub ord_id: String,
pub inst_id: Ustr,
pub inst_type: OKXInstrumentType,
pub ord_type: OKXAlgoOrderType,
pub state: OKXOrderStatus,
pub side: OKXSide,
pub pos_side: OKXPositionSide,
pub sz: String,
pub trigger_px: String,
pub trigger_px_type: OKXTriggerType,
pub sl_trigger_px: String,
pub sl_ord_px: String,
pub sl_trigger_px_type: OKXTriggerType,
pub tp_trigger_px: String,
pub tp_ord_px: String,
pub tp_trigger_px_type: OKXTriggerType,
pub ord_px: String,
pub td_mode: OKXTradeMode,
pub lever: String,
pub reduce_only: String,
pub close_fraction: String,
pub actual_px: String,
pub actual_sz: String,
pub notional_usd: String,
pub c_time: u64,
pub u_time: u64,
pub trigger_time: String,
pub tag: String,
pub callback_ratio: String,
pub callback_spread: String,
pub active_px: String,
pub ccy: Option<Ustr>,
pub tgt_ccy: Option<OKXTargetCurrency>,
pub fee: Option<String>,
pub fee_ccy: Option<Ustr>,
pub advance_ord_type: Option<String>,
}Expand description
Represents an algo order message from WebSocket updates.
Fields§
§algo_id: StringAlgorithm ID.
algo_cl_ord_id: StringAlgorithm client order ID.
cl_ord_id: StringClient order ID (empty for algo orders until triggered).
ord_id: StringOrder ID (empty until algo order is triggered).
inst_id: UstrInstrument ID.
inst_type: OKXInstrumentTypeInstrument type.
ord_type: OKXAlgoOrderTypeAlgo order type (trigger, move_order_stop, oco, iceberg, twap).
state: OKXOrderStatusOrder state.
side: OKXSideSide.
pos_side: OKXPositionSidePosition side.
sz: StringSize.
trigger_px: StringTrigger price.
trigger_px_type: OKXTriggerTypeTrigger price type (last, mark, index).
sl_trigger_px: StringStop-loss trigger price for conditional close orders.
sl_ord_px: StringStop-loss order price for conditional close orders.
sl_trigger_px_type: OKXTriggerTypeStop-loss trigger price type (last, mark, index).
tp_trigger_px: StringTake-profit trigger price for conditional close orders.
tp_ord_px: StringTake-profit order price for conditional close orders.
tp_trigger_px_type: OKXTriggerTypeTake-profit trigger price type (last, mark, index).
ord_px: StringOrder price (-1 for market orders).
td_mode: OKXTradeModeTrade mode.
lever: StringLeverage.
reduce_only: StringReduce only flag.
close_fraction: StringFraction of the position to close for close-order algos.
actual_px: StringActual filled price.
actual_sz: StringActual filled size.
notional_usd: StringNotional USD value.
c_time: u64Creation time, Unix timestamp in milliseconds.
u_time: u64Update time, Unix timestamp in milliseconds.
trigger_time: StringTrigger time (empty until triggered).
tag: StringTag.
callback_ratio: StringCallback price ratio for trailing stop (e.g. “0.01” for 1%).
callback_spread: StringCallback price spread for trailing stop (absolute distance).
active_px: StringActivation price for trailing stop.
ccy: Option<Ustr>Currency.
tgt_ccy: Option<OKXTargetCurrency>Target currency (base_ccy or quote_ccy).
fee: Option<String>Fee amount.
fee_ccy: Option<Ustr>Fee currency.
advance_ord_type: Option<String>Trigger order type (fok, ioc).
Trait Implementations§
Source§impl Clone for OKXAlgoOrderMsg
impl Clone for OKXAlgoOrderMsg
Source§fn clone(&self) -> OKXAlgoOrderMsg
fn clone(&self) -> OKXAlgoOrderMsg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OKXAlgoOrderMsg
impl Debug for OKXAlgoOrderMsg
Source§impl<'de> Deserialize<'de> for OKXAlgoOrderMsg
impl<'de> Deserialize<'de> for OKXAlgoOrderMsg
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>,
Auto Trait Implementations§
impl Freeze for OKXAlgoOrderMsg
impl RefUnwindSafe for OKXAlgoOrderMsg
impl Send for OKXAlgoOrderMsg
impl Sync for OKXAlgoOrderMsg
impl Unpin for OKXAlgoOrderMsg
impl UnsafeUnpin for OKXAlgoOrderMsg
impl UnwindSafe for OKXAlgoOrderMsg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more