Skip to main content

StreamKind

Enum StreamKind 

Source
pub enum StreamKind {
Show 32 variants Ticker, IndexPrice, MarkPrice, CompositeIndex, Orderbook, OrderbookDelta, OrderbookL3, Trade, AggTrade, BlockTrade, Kline { interval: KlineInterval, }, MarkPriceKline { interval: KlineInterval, }, IndexPriceKline { interval: KlineInterval, }, PremiumIndexKline { interval: KlineInterval, }, FundingRate, PredictedFunding, FundingSettlement, OpenInterest, LongShortRatio, InsuranceFund, RiskLimit, Basis, Liquidation, OptionGreeks, VolatilityIndex, HistoricalVolatility, SettlementEvent, AuctionEvent, MarketWarning, OrderUpdate, BalanceUpdate, PositionUpdate,
}
Expand description

Full enumeration of all known WebSocket stream kinds across all supported exchanges.

Variants with { interval: KlineInterval } carry a parameter. All other variants are unit variants (no parameters).

Partitioned into groups for documentation; the enum itself is flat.

Variants§

§

Ticker

Full 24-h rolling ticker (OHLCV + last price + volume)

§

IndexPrice

Index price feed (spot → perpetual fair value)

§

MarkPrice

Mark price feed (settlement-reference price)

§

CompositeIndex

Composite index price (constructed from multiple underlying sources)

§

Orderbook

Level-2 full-depth snapshot

§

OrderbookDelta

Level-2 incremental delta stream

§

OrderbookL3

Level-3 per-order (L3) full orderbook

§

Trade

Individual public trades (time-and-sales)

§

AggTrade

Aggregated trades (multiple fills at same price collapsed)

§

BlockTrade

Block trade / RFQ event (large off-book transactions)

§

Kline

Standard OHLCV candlestick

Fields

§interval: KlineInterval
§

MarkPriceKline

Mark-price candlestick (futures)

Fields

§interval: KlineInterval
§

IndexPriceKline

Index-price candlestick (futures)

Fields

§interval: KlineInterval
§

PremiumIndexKline

Premium-index candlestick (futures; basis ≈ mark−index)

Fields

§interval: KlineInterval
§

FundingRate

Live funding rate (updates intraperiod)

§

PredictedFunding

Predicted funding rate before settlement window opens

§

FundingSettlement

Actual funding settlement event (rate + charged amount)

§

OpenInterest

Open interest snapshot / update

§

LongShortRatio

Long/short ratio (market sentiment)

§

InsuranceFund

Insurance fund balance update

§

RiskLimit

Risk limit tier update (margin tiers)

§

Basis

Basis stream (futures price − spot price)

§

Liquidation

Forced-liquidation event (public)

§

OptionGreeks

Option greeks: delta/gamma/vega/theta/rho + IV

§

VolatilityIndex

Volatility index (e.g. DVOL on Deribit)

§

HistoricalVolatility

Historical realized volatility feed

§

SettlementEvent

Settlement / expiry delivery event

§

AuctionEvent

Auction event (indicative price, crossing state)

§

MarketWarning

Market warning / trading halt notification

§

OrderUpdate

Order lifecycle events (create/fill/cancel/expire)

§

BalanceUpdate

Account balance changes

§

PositionUpdate

Futures position changes

Implementations§

Source§

impl StreamKind

Source

pub fn is_private(&self) -> bool

Returns true if this stream kind requires authentication.

Source

pub fn is_kline(&self) -> bool

Returns true if this variant carries a kline interval parameter.

Trait Implementations§

Source§

impl Clone for StreamKind

Source§

fn clone(&self) -> StreamKind

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 StreamKind

Source§

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

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

impl<'de> Deserialize<'de> for StreamKind

Source§

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

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

impl Eq for StreamKind

Source§

impl From<StreamKind> for StreamType

Source§

fn from(kind: StreamKind) -> Self

Converts to this type from the input type.
Source§

impl Hash for StreamKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for StreamKind

Source§

fn eq(&self, other: &StreamKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for StreamKind

Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StreamKind

Source§

impl TryFrom<StreamType> for StreamKind

Source§

type Error = WebSocketError

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

fn try_from(st: StreamType) -> WebSocketResult<Self>

Performs the conversion.

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<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, 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.