pub enum WsMessage {
Show 37 variants
ClockSync {
nonce: String,
},
ClockSynced {
nonce: String,
server_at: u64,
},
Subscribe {
channel: String,
symbols: Option<Vec<String>>,
expiry: Option<String>,
option_type: Option<String>,
view: Option<RfqV2View>,
},
Unsubscribe {
channel: String,
symbols: Option<Vec<String>>,
expiry: Option<String>,
option_type: Option<String>,
},
OrderUpdate(WsOrderMessage),
ExperimentalOrderUpdate(WsExperimentalOrderUpdate),
ComboTrade(WsComboTrade),
ComboFill(WsComboFill),
OrderbookUpdate(WsOrderbookUpdate),
Fill(WsFillUpdate),
Trade(WsTradeUpdate),
MarketUpdate(WsMarketUpdate),
OptionsChainUpdate(WsOptionsChainUpdate),
IndexPriceUpdate(WsIndexPriceUpdate),
PositionExpired(WsPositionExpired),
LiquidationStateChange(WsLiquidationStateChange),
Authenticate {
wallet: String,
},
AuthenticateRfqV2 {
token: String,
},
Authenticated {
wallet: String,
},
RfqV2Authenticated {
account: WalletAddress,
},
Error {
message: String,
code: Option<String>,
channel: Option<String>,
},
Subscribed {
channel: String,
batch: Option<bool>,
},
Unsubscribed {
channel: String,
},
IndicativeMarketData(WsIndicativeMarketData),
IndicativeMarketDataBatch(WsIndicativeMarketDataBatch),
RfqQuotes(WsRfqQuotes),
RfqStatusUpdate(WsRfqStatusUpdate),
RfqV2Changed(WsRfqV2Changed),
RfqV2Rfq(WsRfqV2Rfq),
SubmitRfq {
rfq_id: String,
legs: Vec<WsRfqLegRequest>,
wallet_address: String,
nonce: u64,
signature: String,
},
SubmitAutoExecuteRfq {
rfq_id: String,
legs: Vec<WsRfqLegRequest>,
wallet_address: String,
limit_price: String,
nonce: u64,
signature: String,
},
AcceptRfqQuote {
rfq_id: String,
quote_id: String,
wallet_address: String,
nonce: u64,
signature: String,
},
RfqAcceptResult {
rfq_id: String,
quote_id: String,
status: String,
fill_id: Option<String>,
taker_wallet: Option<WalletAddress>,
},
PlaceOrder {Show 13 fields
wallet: String,
symbol: String,
side: String,
size: String,
price: String,
tif: Option<String>,
route: Option<String>,
client_id: Option<String>,
nonce: u64,
signature: String,
reduce_only: bool,
mmp_enabled: Option<bool>,
builder_code_address: Option<String>,
},
OrderResult(WsOrderResult),
PortfolioUpdate(PortfolioUpdate),
Other,
}Variants§
ClockSync
Request an API-clock sample for transport-delay upper bounds.
ClockSynced
API-clock sample returned on the same WebSocket connection.
Subscribe
Subscribe to a data channel
Fields
Unsubscribe
Unsubscribe from a data channel
Fields
OrderUpdate(WsOrderMessage)
Order status update (authenticated)
ExperimentalOrderUpdate(WsExperimentalOrderUpdate)
Opt-in private order lifecycle with opaque IDs and native combo parents.
ComboTrade(WsComboTrade)
Opt-in public package grouping; real legs remain in Trade.
ComboFill(WsComboFill)
Opt-in private package grouping, scoped to the authenticated wallet.
OrderbookUpdate(WsOrderbookUpdate)
L2 orderbook snapshot/update
Fill(WsFillUpdate)
Fill notification (authenticated)
Trade(WsTradeUpdate)
Public trade event
MarketUpdate(WsMarketUpdate)
Market listing change
OptionsChainUpdate(WsOptionsChainUpdate)
Incremental options chain update
IndexPriceUpdate(WsIndexPriceUpdate)
Real-time index/spot price update for all underlyings
PositionExpired(WsPositionExpired)
Position expiry notification (authenticated)
LiquidationStateChange(WsLiquidationStateChange)
Liquidation state change (authenticated)
Authenticate
Identify the connection with a wallet address (replaces query-param ?wallet=).
AuthenticateRfqV2
Bind the RFQ V2 channel to a signed private-read bearer.
Authenticated
Server confirms wallet identification
RfqV2Authenticated
Server confirms the verified RFQ V2 account.
Fields
account: WalletAddressError
Error message from server
Fields
Subscribed
Subscription confirmed
Fields
batch: Option<bool>true when the channel is delivered in batch frames, which today
means indicative_market_data_v2. Servers that predate the v2
channel accept any channel name and confirm it without this
field, so a client must treat a confirmation without
batch: true as “v2 unsupported” and fall back to
indicative_market_data.
Unsubscribed
Unsubscription confirmed
IndicativeMarketData(WsIndicativeMarketData)
Indicative market data from aggregated QP quotes (public)
IndicativeMarketDataBatch(WsIndicativeMarketDataBatch)
Several IndicativeMarketData rows coalesced into one frame. Sent on
the indicative_market_data_v2 channel (public)
RfqQuotes(WsRfqQuotes)
RFQ quotes available for taker (authenticated)
RfqStatusUpdate(WsRfqStatusUpdate)
RFQ status update (authenticated)
RfqV2Changed(WsRfqV2Changed)
Opt-in RFQ V2 change hint; read the change feed through private reads.
RfqV2Rfq(WsRfqV2Rfq)
RFQ V2 change with the account’s current RFQ read, sent instead of
RfqV2Changed to an rfq_v2 subscription with view: "full".
SubmitRfq
Submit an RFQ request via WebSocket (authenticated)
Fields
legs: Vec<WsRfqLegRequest>SubmitAutoExecuteRfq
Submit an RFQ with auto-execute via WebSocket (authenticated).
The taker pre-authorizes execution with a directional limit_price.
Fields
legs: Vec<WsRfqLegRequest>AcceptRfqQuote
Accept an RFQ quote via WebSocket (authenticated)
RfqAcceptResult
RFQ accept result pushed back to the client
Fields
taker_wallet: Option<WalletAddress>Used for wallet-based filtering in publish_to_channel so
the result is only delivered to the taker, not all rfq
subscribers. Excluded from the wire format.
PlaceOrder
Place an order via WebSocket (authenticated)
Fields
OrderResult(WsOrderResult)
Order placement result pushed back to the client
PortfolioUpdate(PortfolioUpdate)
Portfolio update (authenticated). The frame’s only type is the
update kind: Initial, PositionUpdate, BalanceUpdate,
MarginUpdate, or GreeksUpdate.
Other
Any frame whose type is not one of KNOWN_WS_MESSAGE_TAGS, so
newer servers can add message types. Serializes as {"type":"Other"}.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WsMessage
impl<'de> Deserialize<'de> for WsMessage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WsMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WsMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for WsMessage
impl Serialize for WsMessage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Forget for WsMessage
impl Freeze for WsMessage
impl Move for WsMessage
impl RefUnwindSafe for WsMessage
impl Send for WsMessage
impl Sync for WsMessage
impl Unpin for WsMessage
impl UnsafeUnpin for WsMessage
impl UnwindSafe for WsMessage
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<'de, T> BorrowedRpcObject<'de> for 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> 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