pub struct BinanceChannel(pub &'static str);Expand description
Type that defines how to translate a Barter Subscription into a Binance
channel to be subscribed to.
See docs: https://binance-docs.github.io/apidocs/spot/en/#websocket-market-streams See docs: https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams
Tuple Fields§
§0: &'static strImplementations§
Source§impl BinanceChannel
impl BinanceChannel
Sourcepub const TRADES: Self
pub const TRADES: Self
Binance real-time trades channel name.
See docs: https://binance-docs.github.io/apidocs/spot/en/#trade-streams
Note:
For BinanceFuturesUsd this real-time
stream is undocumented.
See discord: https://discord.com/channels/910237311332151317/923160222711812126/975712874582388757
Sourcepub const ORDER_BOOK_L1: Self
pub const ORDER_BOOK_L1: Self
Binance real-time OrderBook Level1 (top of books) channel name.
See docs:https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-book-ticker-streams See docs:https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-book-ticker-streams
Sourcepub const ORDER_BOOK_L2: Self
pub const ORDER_BOOK_L2: Self
Binance OrderBook Level2 channel name (100ms delta updates).
See docs: https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream See docs: https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
Sourcepub const LIQUIDATIONS: Self
pub const LIQUIDATIONS: Self
BinanceFuturesUsd liquidation orders channel name.
Routed on Binance’s /market WS tier (see
BinanceFuturesUsdMarket).
See docs: https://binance-docs.github.io/apidocs/futures/en/#liquidation-order-streams
Sourcepub const fn spot_candle(interval: CandleInterval) -> Self
pub const fn spot_candle(interval: CandleInterval) -> Self
BinanceSpot kline (candle) channel name for the given CandleInterval,
e.g. @kline_1m.
The interval suffix is exactly CandleInterval::as_str — pinned by the
spot_candle_channel_suffix_matches_interval drift-guard test.
See docs: https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-streams
Sourcepub const fn futures_candle(interval: CandleInterval) -> Self
pub const fn futures_candle(interval: CandleInterval) -> Self
BinanceFuturesUsd continuous-contract
(perpetual) kline channel name for the given CandleInterval, e.g.
_perpetual@continuousKline_1m.
Routed on Binance’s /market WS tier (see
BinanceFuturesUsdMarket). The
contractType is fixed PERPETUAL because BinanceFuturesUsd
is perpetual-only. The interval suffix is exactly CandleInterval::as_str —
pinned by the futures_candle_channel_suffix_matches_interval drift-guard test.
See docs: https://binance-docs.github.io/apidocs/futures/en/#continuous-contract-kline-candlestick-streams
Trait Implementations§
Source§impl AsRef<str> for BinanceChannel
impl AsRef<str> for BinanceChannel
Source§impl Clone for BinanceChannel
impl Clone for BinanceChannel
Source§fn clone(&self) -> BinanceChannel
fn clone(&self) -> BinanceChannel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BinanceChannel
Source§impl Debug for BinanceChannel
impl Debug for BinanceChannel
impl Eq for BinanceChannel
Source§impl Hash for BinanceChannel
impl Hash for BinanceChannel
Source§impl<Server, Instrument> Identifier<BinanceChannel> for Subscription<Binance<Server>, Instrument, PublicTrades>
impl<Server, Instrument> Identifier<BinanceChannel> for Subscription<Binance<Server>, Instrument, PublicTrades>
fn id(&self) -> BinanceChannel
Source§impl<Server, Instrument> Identifier<BinanceChannel> for Subscription<Binance<Server>, Instrument, OrderBooksL1>
impl<Server, Instrument> Identifier<BinanceChannel> for Subscription<Binance<Server>, Instrument, OrderBooksL1>
fn id(&self) -> BinanceChannel
Source§impl<Server, Instrument> Identifier<BinanceChannel> for Subscription<Binance<Server>, Instrument, OrderBooksL2>
impl<Server, Instrument> Identifier<BinanceChannel> for Subscription<Binance<Server>, Instrument, OrderBooksL2>
fn id(&self) -> BinanceChannel
Source§impl<Instrument> Identifier<BinanceChannel> for Subscription<BinanceFuturesUsdMarket, Instrument, Liquidations>
impl<Instrument> Identifier<BinanceChannel> for Subscription<BinanceFuturesUsdMarket, Instrument, Liquidations>
fn id(&self) -> BinanceChannel
Source§impl<Instrument> Identifier<BinanceChannel> for Subscription<BinanceSpot, Instrument, Candles>
impl<Instrument> Identifier<BinanceChannel> for Subscription<BinanceSpot, Instrument, Candles>
fn id(&self) -> BinanceChannel
Source§impl<Instrument> Identifier<BinanceChannel> for Subscription<BinanceFuturesUsdMarket, Instrument, Candles>
impl<Instrument> Identifier<BinanceChannel> for Subscription<BinanceFuturesUsdMarket, Instrument, Candles>
fn id(&self) -> BinanceChannel
Source§impl Ord for BinanceChannel
impl Ord for BinanceChannel
Source§fn cmp(&self, other: &BinanceChannel) -> Ordering
fn cmp(&self, other: &BinanceChannel) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for BinanceChannel
impl PartialEq for BinanceChannel
Source§fn eq(&self, other: &BinanceChannel) -> bool
fn eq(&self, other: &BinanceChannel) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BinanceChannel
impl PartialOrd for BinanceChannel
Source§impl Serialize for BinanceChannel
impl Serialize for BinanceChannel
impl StructuralPartialEq for BinanceChannel
Auto Trait Implementations§
impl Freeze for BinanceChannel
impl RefUnwindSafe for BinanceChannel
impl Send for BinanceChannel
impl Sync for BinanceChannel
impl Unpin for BinanceChannel
impl UnsafeUnpin for BinanceChannel
impl UnwindSafe for BinanceChannel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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