pub enum BinanceSpotWsTradingMessage {
Show 17 variants
Connected,
Authenticated,
Reconnected,
OrderAccepted {
request_id: String,
response: BinanceNewOrderResponse,
},
OrderRejected {
request_id: String,
code: i32,
msg: String,
},
OrderCanceled {
request_id: String,
response: BinanceCancelOrderResponse,
},
CancelRejected {
request_id: String,
code: i32,
msg: String,
},
CancelReplaceAccepted {
request_id: String,
cancel_response: BinanceCancelOrderResponse,
new_order_response: BinanceNewOrderResponse,
},
CancelReplaceRejected {
request_id: String,
code: i32,
msg: String,
},
RequestFailed {
request_id: String,
msg: String,
},
AllOrdersCanceled {
request_id: String,
responses: Vec<BinanceCancelOrderResponse>,
},
UserDataSubscribed {
subscription_id: String,
},
ExecutionReport(Box<BinanceSpotExecutionReport>),
AccountPosition(BinanceSpotAccountPositionMsg),
BalanceUpdate(BinanceSpotBalanceUpdateMsg),
ServerShutdown {
event_time: i64,
},
Error(String),
}Expand description
Normalized output message from the WebSocket API handler.
These messages are emitted by the handler and consumed by the client for routing to callers or the execution engine.
Variants§
Connected
Connection established.
Authenticated
Session authenticated successfully.
Reconnected
Connection was re-established after disconnect.
OrderAccepted
Order accepted by venue.
Fields
response: BinanceNewOrderResponseOrder response from venue.
OrderRejected
Order rejected by venue.
Fields
OrderCanceled
Order canceled successfully.
Fields
response: BinanceCancelOrderResponseCancel response from venue.
CancelRejected
Cancel rejected by venue.
Fields
CancelReplaceAccepted
Cancel-replace response (new order after cancel).
Fields
cancel_response: BinanceCancelOrderResponseCancel response.
new_order_response: BinanceNewOrderResponseNew order response.
CancelReplaceRejected
Cancel-replace rejected.
Fields
RequestFailed
Request failed without a structured venue response.
AllOrdersCanceled
All orders canceled for a symbol.
Fields
responses: Vec<BinanceCancelOrderResponse>Canceled order responses.
UserDataSubscribed
User data stream subscribed.
ExecutionReport(Box<BinanceSpotExecutionReport>)
Order execution report from user data stream.
AccountPosition(BinanceSpotAccountPositionMsg)
Account position update from user data stream.
BalanceUpdate(BinanceSpotBalanceUpdateMsg)
Balance update from user data stream.
ServerShutdown
Server shutdown notice (sent ~10 minutes before disconnection).
Error(String)
Error from venue or network.
Trait Implementations§
Source§impl Clone for BinanceSpotWsTradingMessage
impl Clone for BinanceSpotWsTradingMessage
Source§fn clone(&self) -> BinanceSpotWsTradingMessage
fn clone(&self) -> BinanceSpotWsTradingMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BinanceSpotWsTradingMessage
impl RefUnwindSafe for BinanceSpotWsTradingMessage
impl Send for BinanceSpotWsTradingMessage
impl Sync for BinanceSpotWsTradingMessage
impl Unpin for BinanceSpotWsTradingMessage
impl UnsafeUnpin for BinanceSpotWsTradingMessage
impl UnwindSafe for BinanceSpotWsTradingMessage
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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