pub enum NautilusWsApiMessage {
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,
},
AllOrdersCanceled {
request_id: String,
responses: Vec<BinanceCancelOrderResponse>,
},
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
AllOrdersCanceled
All orders canceled for a symbol.
Fields
§
responses: Vec<BinanceCancelOrderResponse>Canceled order responses.
Error(String)
Error from venue or network.
Trait Implementations§
Source§impl Clone for NautilusWsApiMessage
impl Clone for NautilusWsApiMessage
Source§fn clone(&self) -> NautilusWsApiMessage
fn clone(&self) -> NautilusWsApiMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NautilusWsApiMessage
impl RefUnwindSafe for NautilusWsApiMessage
impl Send for NautilusWsApiMessage
impl Sync for NautilusWsApiMessage
impl Unpin for NautilusWsApiMessage
impl UnwindSafe for NautilusWsApiMessage
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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