pub enum UserDataEvent {
OrderUpdate(Box<OrderUpdateEvent>),
AccountUpdate(Box<AccountUpdateEvent>),
AccountConfigUpdate(AccountConfigUpdateEvent),
MarginCall(MarginCallEvent),
ListenKeyExpired(ListenKeyExpiredEvent),
TradePro(TradeProEvent),
Unknown(Value),
}Expand description
All user data stream event types received over the WebSocket user data stream.
Deserializes from the raw JSON received over a UserDataStream.
Use UserDataStream::next_event() to receive typed events.
§Event Types
ORDER_TRADE_UPDATE→OrderUpdateACCOUNT_UPDATE→AccountUpdateACCOUNT_CONFIG_UPDATE→AccountConfigUpdateMARGIN_CALL→MarginCalllistenKeyExpired→ListenKeyExpiredtradepro→TradePro- Unknown types →
Unknown(logged as warning, never panics)
Large variants (OrderUpdate, AccountUpdate) are boxed to reduce stack size.
Variants§
OrderUpdate(Box<OrderUpdateEvent>)
Order trade update event (boxed to reduce enum stack size — US-016 clippy fix).
AccountUpdate(Box<AccountUpdateEvent>)
Account balance/position update event (boxed to reduce enum stack size — US-016 clippy fix).
AccountConfigUpdate(AccountConfigUpdateEvent)
Account configuration update event (leverage or multi-assets margin mode change).
MarginCall(MarginCallEvent)
Margin call risk warning event.
ListenKeyExpired(ListenKeyExpiredEvent)
Listen key expired — consumer must create a new listen key to continue receiving events.
TradePro(TradeProEvent)
Trade execution details with on-chain participant addresses.
Unknown(Value)
Unknown event type — captured as raw JSON for forward compatibility.
Trait Implementations§
Source§impl Debug for UserDataEvent
impl Debug for UserDataEvent
Source§impl<'de> Deserialize<'de> for UserDataEvent
impl<'de> Deserialize<'de> for UserDataEvent
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Auto Trait Implementations§
impl Freeze for UserDataEvent
impl RefUnwindSafe for UserDataEvent
impl Send for UserDataEvent
impl Sync for UserDataEvent
impl Unpin for UserDataEvent
impl UnsafeUnpin for UserDataEvent
impl UnwindSafe for UserDataEvent
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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