pub enum ClientMessage {
Subscribe {
id: Option<RequestId>,
params: Vec<String>,
},
Unsubscribe {
id: Option<RequestId>,
params: Vec<String>,
},
ListSubscriptions {
id: Option<RequestId>,
},
Ping {
id: Option<RequestId>,
},
Submit {
id: Option<RequestId>,
params: OrderParams,
},
OrderPlace {
id: Option<RequestId>,
params: OrderParams,
},
OrderCancel {
id: Option<RequestId>,
params: OrderParams,
},
OrderAmend {
id: Option<RequestId>,
params: OrderParams,
},
OrderCancelAll {
id: Option<RequestId>,
params: OrderParams,
},
}Expand description
Messages sent from client to server (Binance-style)
Variants§
Subscribe
Unsubscribe
ListSubscriptions
Ping
Submit
Submit a signed transaction over the rollup WebSocket.
The action — place, cancel, amend, cancel-all, cancel-and-place, etc. —
is encoded in the signed transaction itself (bullet-exchange-interface’s
UserAction); the server decodes the transaction and dispatches on the
inner action. Prefer this over the per-action ORDER.* methods below,
which restate — without enforcing — the action already in tx.
OrderPlace
use ClientMessage::Submit; the action is decoded from the signed tx
Place an order via the rollup WebSocket.
Fields
id: Option<RequestId>use ClientMessage::Submit; the action is decoded from the signed tx
params: OrderParamsuse ClientMessage::Submit; the action is decoded from the signed tx
OrderCancel
use ClientMessage::Submit; the action is decoded from the signed tx
Cancel an order via the rollup WebSocket.
Fields
id: Option<RequestId>use ClientMessage::Submit; the action is decoded from the signed tx
params: OrderParamsuse ClientMessage::Submit; the action is decoded from the signed tx
OrderAmend
use ClientMessage::Submit; the action is decoded from the signed tx
Amend an order via the rollup WebSocket.
Fields
id: Option<RequestId>use ClientMessage::Submit; the action is decoded from the signed tx
params: OrderParamsuse ClientMessage::Submit; the action is decoded from the signed tx
OrderCancelAll
use ClientMessage::Submit; the action is decoded from the signed tx
Cancel all open orders via the rollup WebSocket.
Fields
id: Option<RequestId>use ClientMessage::Submit; the action is decoded from the signed tx
params: OrderParamsuse ClientMessage::Submit; the action is decoded from the signed tx
Trait Implementations§
Source§impl Clone for ClientMessage
impl Clone for ClientMessage
Source§fn clone(&self) -> ClientMessage
fn clone(&self) -> ClientMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more