#[non_exhaustive]pub struct AdvancedAlgoOrderUpdate {Show 44 fields
pub inst_type: String,
pub inst_id: String,
pub ccy: String,
pub ord_id: String,
pub algo_id: String,
pub cl_ord_id: String,
pub algo_cl_ord_id: String,
pub ord_type: String,
pub side: String,
pub pos_side: String,
pub td_mode: String,
pub tgt_ccy: String,
pub sz: NumberString,
pub lever: NumberString,
pub state: String,
pub tp_trigger_px: NumberString,
pub tp_ord_px: NumberString,
pub sl_trigger_px: NumberString,
pub sl_ord_px: NumberString,
pub trigger_px: NumberString,
pub ord_px: NumberString,
pub actual_sz: NumberString,
pub actual_px: NumberString,
pub notional_usd: NumberString,
pub tag: String,
pub actual_side: String,
pub trigger_time: NumberString,
pub px_var: NumberString,
pub px_spread: NumberString,
pub sz_limit: NumberString,
pub px_limit: NumberString,
pub time_interval: NumberString,
pub count: NumberString,
pub callback_ratio: NumberString,
pub callback_spread: NumberString,
pub active_px: NumberString,
pub move_trigger_px: NumberString,
pub fail_code: String,
pub reduce_only: String,
pub trade_quote_ccy: String,
pub is_trade_borrow_mode: Value,
pub c_time: NumberString,
pub p_time: NumberString,
pub extra: ExtraFields,
}Expand description
Private algo-advance channel row.
OKX docs: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-ws-advance-algo-orders-channel
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.inst_type: StringInstrument type, e.g., SPOT, SWAP, FUTURES.
inst_id: StringInstrument ID, e.g., BTC-USDT.
ccy: StringMargin currency.
ord_id: StringOKX-assigned order ID of the associated regular order.
algo_id: StringOKX-assigned algo order ID.
cl_ord_id: StringClient-supplied order ID.
algo_cl_ord_id: StringClient-supplied algo order ID.
ord_type: StringAdvanced algo order type: iceberg or twap.
side: StringOrder side: buy or sell.
pos_side: StringPosition side: long, short, or net.
td_mode: StringTrade mode: cross, isolated, or cash.
tgt_ccy: StringTarget currency for quantity: base_ccy or quote_ccy (spot market orders only).
sz: NumberStringTotal order size.
lever: NumberStringLeverage.
state: StringOrder state.
Documented values: live, pause, partially_effective, effective,
canceled, order_failed.
tp_trigger_px: NumberStringTake-profit trigger price.
tp_ord_px: NumberStringTake-profit order price.
sl_trigger_px: NumberStringStop-loss trigger price.
sl_ord_px: NumberStringStop-loss order price.
trigger_px: NumberStringTrigger price.
ord_px: NumberStringLimit price for each child order placed by the algo.
actual_sz: NumberStringSize executed so far.
actual_px: NumberStringAverage fill price of executed child orders.
notional_usd: NumberStringEstimated notional value in USD.
tag: StringOrder tag.
actual_side: StringEffective side of executed child orders.
trigger_time: NumberStringTrigger time (Unix milliseconds).
px_var: NumberStringPrice ratio (iceberg / twap orders).
px_spread: NumberStringPrice variance (iceberg / twap orders).
sz_limit: NumberStringAverage amount per child order (iceberg / twap orders).
px_limit: NumberStringPrice limit (iceberg / twap orders).
time_interval: NumberStringTime interval between child orders (twap orders).
count: NumberStringTotal number of child orders placed (iceberg / twap orders).
callback_ratio: NumberStringTrailing callback ratio (move_order_stop orders).
callback_spread: NumberStringTrailing callback spread (move_order_stop orders).
active_px: NumberStringActivated tracking price (move_order_stop orders).
move_trigger_px: NumberStringPrice that activated the trailing move trigger.
fail_code: StringError code when state is order_failed; empty otherwise.
reduce_only: StringWhether the order can only reduce the position size: "true" or "false".
trade_quote_ccy: StringThe quote currency used for trading.
is_trade_borrow_mode: ValueWhether borrowing currency automatically.
OKX sends a JSON boolean (true/false) for applicable order types; uses Value
to accommodate any future variation.
c_time: NumberStringAlgo order creation time (Unix milliseconds).
p_time: NumberStringPush time (Unix milliseconds).
extra: ExtraFieldsUnrecognized fields retained for forward compatibility.
Trait Implementations§
Source§impl Clone for AdvancedAlgoOrderUpdate
impl Clone for AdvancedAlgoOrderUpdate
Source§fn clone(&self) -> AdvancedAlgoOrderUpdate
fn clone(&self) -> AdvancedAlgoOrderUpdate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more