pub enum DeribitWsChannel {
Show 18 variants
Trades,
Book,
Ticker,
Quote,
PriceIndex,
PriceRanking,
VolatilityIndex,
EstimatedExpirationPrice,
Perpetual,
MarkPriceOptions,
PlatformState,
Announcements,
ChartTrades,
UserOrders,
UserTrades,
UserPortfolio,
UserChanges,
UserAccessLog,
}Expand description
Deribit WebSocket public data channels.
Channels follow the format: {channel_type}.{instrument_or_currency}.{interval}
Variants§
Trades
Raw trade stream: trades.{instrument}.raw
Book
Order book updates: book.{instrument}.{group}.{depth}.{interval}
Ticker
Ticker updates: ticker.{instrument}.{interval}
Quote
Quote updates (best bid/ask): quote.{instrument}
PriceIndex
Index price: deribit_price_index.{currency}
PriceRanking
Price ranking: deribit_price_ranking.{currency}
VolatilityIndex
Volatility index: deribit_volatility_index.{currency}
EstimatedExpirationPrice
Estimated expiration price: estimated_expiration_price.{currency}
Perpetual
Perpetual interest rate: perpetual.{instrument}.{interval}
MarkPriceOptions
Mark price options: markprice.options.{currency}
PlatformState
Platform state: platform_state
Announcements
Announcements: announcements
ChartTrades
Chart trades: chart.trades.{instrument}.{resolution}
UserOrders
User orders: user.orders.{instrument}.{interval}
UserTrades
User trades/fills: user.trades.{instrument}.{interval}
UserPortfolio
User portfolio: user.portfolio.{currency}
UserChanges
User changes (combined orders/trades/positions): user.changes.{instrument}.{interval}
UserAccessLog
User access log: user.access_log
Implementations§
Source§impl DeribitWsChannel
impl DeribitWsChannel
Sourcepub fn format_channel(
&self,
instrument_or_currency: &str,
interval: Option<DeribitUpdateInterval>,
) -> String
pub fn format_channel( &self, instrument_or_currency: &str, interval: Option<DeribitUpdateInterval>, ) -> String
Formats the channel name for subscription with the given instrument or currency.
Returns the full channel string for Deribit subscription.
§Arguments
instrument_or_currency- The instrument name (e.g., “BTC-PERPETUAL”) or currency (e.g., “BTC”)interval- Optional update interval. Defaults toMs100(100ms) if not specified.
§Note
Raw subscriptions require authentication. Use Ms100 for public/unauthenticated access.
Sourcepub fn from_channel_string(channel: &str) -> Option<Self>
pub fn from_channel_string(channel: &str) -> Option<Self>
Parses a channel string to extract the channel type.
Returns the channel enum variant if recognized.
Sourcepub const fn is_private(&self) -> bool
pub const fn is_private(&self) -> bool
Returns whether this is a private (authenticated) channel.
Trait Implementations§
Source§impl AsRef<str> for DeribitWsChannel
impl AsRef<str> for DeribitWsChannel
Source§impl Clone for DeribitWsChannel
impl Clone for DeribitWsChannel
Source§fn clone(&self) -> DeribitWsChannel
fn clone(&self) -> DeribitWsChannel
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeribitWsChannel
impl Debug for DeribitWsChannel
Source§impl<'de> Deserialize<'de> for DeribitWsChannel
impl<'de> Deserialize<'de> for DeribitWsChannel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for DeribitWsChannel
impl Display for DeribitWsChannel
Source§impl FromStr for DeribitWsChannel
impl FromStr for DeribitWsChannel
Source§impl Hash for DeribitWsChannel
impl Hash for DeribitWsChannel
Source§impl IntoEnumIterator for DeribitWsChannel
impl IntoEnumIterator for DeribitWsChannel
type Iterator = DeribitWsChannelIter
fn iter() -> DeribitWsChannelIter ⓘ
Source§impl PartialEq for DeribitWsChannel
impl PartialEq for DeribitWsChannel
Source§impl Serialize for DeribitWsChannel
impl Serialize for DeribitWsChannel
Source§impl TryFrom<&str> for DeribitWsChannel
impl TryFrom<&str> for DeribitWsChannel
impl Eq for DeribitWsChannel
impl StructuralPartialEq for DeribitWsChannel
Auto Trait Implementations§
impl Freeze for DeribitWsChannel
impl RefUnwindSafe for DeribitWsChannel
impl Send for DeribitWsChannel
impl Sync for DeribitWsChannel
impl Unpin for DeribitWsChannel
impl UnwindSafe for DeribitWsChannel
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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>
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§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Separable for Twhere
T: Display,
impl<T> Separable for Twhere
T: Display,
Source§fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
SeparatorPolicy. Read moreSource§fn separate_with_commas(&self) -> String
fn separate_with_commas(&self) -> String
Source§fn separate_with_spaces(&self) -> String
fn separate_with_spaces(&self) -> String
Source§fn separate_with_dots(&self) -> String
fn separate_with_dots(&self) -> String
Source§fn separate_with_underscores(&self) -> String
fn separate_with_underscores(&self) -> String
§impl<T> SetterInput<Owned> for T
impl<T> SetterInput<Owned> for T
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.