pub struct OKXOrderMsg {Show 66 fields
pub acc_fill_sz: Option<String>,
pub algo_id: Option<String>,
pub avg_px: String,
pub c_time: u64,
pub cancel_source: Option<String>,
pub cancel_source_reason: Option<String>,
pub category: OKXOrderCategory,
pub ccy: Ustr,
pub cl_ord_id: String,
pub algo_cl_ord_id: Option<String>,
pub attach_algo_cl_ord_id: Option<String>,
pub attach_algo_ords: Vec<OKXAttachedAlgoOrd>,
pub fee: Option<String>,
pub fee_ccy: Ustr,
pub fill_fee: Option<String>,
pub fill_fee_ccy: Option<Ustr>,
pub fill_mark_px: Option<String>,
pub fill_mark_vol: Option<String>,
pub fill_px_vol: Option<String>,
pub fill_px_usd: Option<String>,
pub fill_fwd_px: Option<String>,
pub fill_notional_usd: Option<String>,
pub fill_pnl: Option<String>,
pub fill_px: String,
pub fill_sz: String,
pub fill_time: u64,
pub inst_id: Ustr,
pub inst_type: OKXInstrumentType,
pub is_tp_limit: Option<String>,
pub lever: String,
pub linked_algo_ord: Option<OKXLinkedAlgoOrd>,
pub notional_usd: Option<String>,
pub ord_id: Ustr,
pub ord_type: OKXOrderType,
pub pnl: String,
pub pos_side: OKXPositionSide,
pub px: String,
pub px_type: OKXPriceType,
pub px_usd: Option<String>,
pub px_vol: Option<String>,
pub quick_mgn_type: OKXQuickMarginType,
pub rebate: Option<String>,
pub rebate_ccy: Option<Ustr>,
pub reduce_only: String,
pub side: OKXSide,
pub sl_ord_px: Option<String>,
pub sl_trigger_px: Option<String>,
pub sl_trigger_px_type: Option<OKXTriggerType>,
pub source: Option<String>,
pub state: OKXOrderStatus,
pub stp_id: Option<String>,
pub stp_mode: OKXSelfTradePreventionMode,
pub exec_type: OKXExecType,
pub sz: String,
pub tag: Option<String>,
pub td_mode: OKXTradeMode,
pub tgt_ccy: Option<OKXTargetCurrency>,
pub tp_ord_px: Option<String>,
pub tp_trigger_px: Option<String>,
pub tp_trigger_px_type: Option<OKXTriggerType>,
pub trade_id: String,
pub u_time: u64,
pub amend_result: Option<String>,
pub req_id: Option<String>,
pub code: Option<String>,
pub msg: Option<String>,
}Expand description
Order update message from WebSocket orders channel.
Fields§
§acc_fill_sz: Option<String>Accumulated filled size.
algo_id: Option<String>Algo order ID.
avg_px: StringAverage price.
c_time: u64Creation time, Unix timestamp in milliseconds.
cancel_source: Option<String>Cancel source.
cancel_source_reason: Option<String>Cancel source reason.
category: OKXOrderCategoryOrder category (normal, liquidation, ADL, etc.).
ccy: UstrCurrency.
cl_ord_id: StringClient order ID.
algo_cl_ord_id: Option<String>Parent algo client order ID if present.
attach_algo_cl_ord_id: Option<String>Attached child client order ID if surfaced at the top level.
attach_algo_ords: Vec<OKXAttachedAlgoOrd>Attached TP/SL child order metadata.
fee: Option<String>Fee (cumulative).
fee_ccy: UstrFee currency.
fill_fee: Option<String>Fee for this fill.
fill_fee_ccy: Option<Ustr>Fill fee currency.
fill_mark_px: Option<String>Mark price at fill time.
fill_mark_vol: Option<String>Mark volatility at fill time (options).
fill_px_vol: Option<String>Implied volatility at fill time (options).
fill_px_usd: Option<String>Fill price in USD (options).
fill_fwd_px: Option<String>Forward price at fill time (options).
fill_notional_usd: Option<String>Fill notional in USD.
fill_pnl: Option<String>PnL for this fill.
fill_px: StringFill price.
fill_sz: StringFill size.
fill_time: u64Fill time, Unix timestamp in milliseconds.
inst_id: UstrInstrument ID.
inst_type: OKXInstrumentTypeInstrument type.
is_tp_limit: Option<String>Whether the TP order is a limit order.
lever: StringLeverage.
linked_algo_ord: Option<OKXLinkedAlgoOrd>Linked algo order metadata.
notional_usd: Option<String>Notional value in USD.
ord_id: UstrOrder ID.
ord_type: OKXOrderTypeOrder type.
pnl: StringProfit and loss.
pos_side: OKXPositionSidePosition side.
px: StringPrice (algo orders use ordPx instead).
px_type: OKXPriceTypePrice type (options).
px_usd: Option<String>Price in USD (options).
px_vol: Option<String>Price in volatility (options).
quick_mgn_type: OKXQuickMarginTypeQuick margin type.
rebate: Option<String>Rebate amount.
rebate_ccy: Option<Ustr>Rebate currency.
reduce_only: StringReduce only flag.
side: OKXSideSide.
sl_ord_px: Option<String>Stop-loss order price.
sl_trigger_px: Option<String>Stop-loss trigger price.
sl_trigger_px_type: Option<OKXTriggerType>Stop-loss trigger price type (last, mark, index).
source: Option<String>Order source.
state: OKXOrderStatusOrder state.
stp_id: Option<String>Self-trade prevention ID.
stp_mode: OKXSelfTradePreventionModeSelf-trade prevention mode.
exec_type: OKXExecTypeExecution type.
sz: StringSize.
tag: Option<String>Order tag.
td_mode: OKXTradeModeTrade mode.
tgt_ccy: Option<OKXTargetCurrency>Target currency (base_ccy or quote_ccy). Empty for margin modes.
tp_ord_px: Option<String>Take-profit order price.
tp_trigger_px: Option<String>Take-profit trigger price.
tp_trigger_px_type: Option<OKXTriggerType>Take-profit trigger price type (last, mark, index).
trade_id: StringTrade ID.
u_time: u64Last update time, Unix timestamp in milliseconds.
amend_result: Option<String>Amend result code.
req_id: Option<String>Request ID (for amend responses).
code: Option<String>Error code.
msg: Option<String>Error message.
Trait Implementations§
Source§impl Clone for OKXOrderMsg
impl Clone for OKXOrderMsg
Source§fn clone(&self) -> OKXOrderMsg
fn clone(&self) -> OKXOrderMsg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OKXOrderMsg
impl Debug for OKXOrderMsg
Source§impl<'de> Deserialize<'de> for OKXOrderMsg
impl<'de> Deserialize<'de> for OKXOrderMsg
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 OKXOrderMsg
impl RefUnwindSafe for OKXOrderMsg
impl Send for OKXOrderMsg
impl Sync for OKXOrderMsg
impl Unpin for OKXOrderMsg
impl UnsafeUnpin for OKXOrderMsg
impl UnwindSafe for OKXOrderMsg
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