Skip to main content

WsMessage

Enum WsMessage 

Source
pub enum WsMessage {
Show 36 variants ClockSync { nonce: String, }, ClockSynced { nonce: String, server_at: u64, }, Subscribe { channel: String, symbols: Option<Vec<String>>, expiry: Option<String>, option_type: Option<String>, }, 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), 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.

Fields

§nonce: String
§

ClockSynced

API-clock sample returned on the same WebSocket connection.

Fields

§nonce: String
§server_at: u64
§

Subscribe

Subscribe to a data channel

Fields

§channel: String
§symbols: Option<Vec<String>>
§expiry: Option<String>
§option_type: Option<String>
§

Unsubscribe

Unsubscribe from a data channel

Fields

§channel: String
§symbols: Option<Vec<String>>
§expiry: Option<String>
§option_type: Option<String>
§

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=).

Fields

§wallet: String
§

AuthenticateRfqV2

Bind the RFQ V2 channel to a signed private-read bearer.

Fields

§token: String
§

Authenticated

Server confirms wallet identification

Fields

§wallet: String
§

RfqV2Authenticated

Server confirms the verified RFQ V2 account.

Fields

§

Error

Error message from server

Fields

§message: String
§code: Option<String>

Stable machine-readable reason, when the error has one, for example unknown_channel. Match on this, not on message.

§channel: Option<String>

The channel a rejected Subscribe named.

§

Subscribed

Subscription confirmed

Fields

§channel: String
§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

Fields

§channel: String
§

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.

§

SubmitRfq

Submit an RFQ request via WebSocket (authenticated)

Fields

§rfq_id: String
§wallet_address: String
§nonce: u64
§signature: String
§

SubmitAutoExecuteRfq

Submit an RFQ with auto-execute via WebSocket (authenticated). The taker pre-authorizes execution with a directional limit_price.

Fields

§rfq_id: String
§wallet_address: String
§limit_price: String

Directional premium limit as a decimal string. Buy RFQs use this as a max debit. Sell RFQs use it as a min credit.

§nonce: u64
§signature: String
§

AcceptRfqQuote

Accept an RFQ quote via WebSocket (authenticated)

Fields

§rfq_id: String
§quote_id: String
§wallet_address: String
§nonce: u64
§signature: String
§

RfqAcceptResult

RFQ accept result pushed back to the client

Fields

§rfq_id: String
§quote_id: String
§status: String
§fill_id: Option<String>
§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

§wallet: String
§symbol: String
§side: String
§size: String
§price: String
§route: Option<String>

Optional route during the deprecation window. Omitted route keeps the legacy WebSocket orderbook path for now. It will not be required before July 4, 2026, but may become required later.

§client_id: Option<String>
§nonce: u64
§signature: String
§reduce_only: bool
§mmp_enabled: Option<bool>
§builder_code_address: Option<String>
§

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 Clone for WsMessage

Source§

fn clone(&self) -> WsMessage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WsMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for WsMessage

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<WsMessage, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for WsMessage

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'de, T> BorrowedRpcObject<'de> for T
where T: RpcBorrow<'de> + RpcSend,

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<'de, T> RpcBorrow<'de> for T
where T: Deserialize<'de> + Debug + Send + Sync + Unpin,

Source§

impl<T> RpcObject for T
where T: RpcSend + RpcRecv,

Source§

impl<T> RpcRecv for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

Source§

impl<T> RpcSend for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more