Enum barter_data::ExchangeId
source · [−]pub enum ExchangeId {
BinanceFuturesUsd,
Binance,
Coinbase,
Ftx,
Kraken,
}Expand description
Used to uniquely identify an ExchangeTransformer implementation. Each variant represents an
exchange server which can be subscribed to. Note that an exchange may have multiple servers
(eg/ binance, binance_futures), therefore there could be a many-to-one relationship between
an ExchangeId and an Exchange.
Variants
BinanceFuturesUsd
Binance
Coinbase
Ftx
Kraken
Implementations
sourceimpl ExchangeId
impl ExchangeId
sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
Return the exchange name associated with this ExchangeId.
eg/ ExchangeId::BinanceFuturesUsd => “binance”
sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Return the &str representation this ExchangeId is associated with.
sourcepub fn supports_spot(&self) -> bool
pub fn supports_spot(&self) -> bool
Determines whether this ExchangeId supports the ingestion of
InstrumentKind::Spot market data.
sourcepub fn supports_futures(&self) -> bool
pub fn supports_futures(&self) -> bool
Determines whether this ExchangeId supports the collection of
InstrumentKind::Future** market data.
sourcepub fn supports_trades(&self) -> bool
pub fn supports_trades(&self) -> bool
Determines whether this ExchangeId supports the collection of
PublicTrade market data.
sourcepub fn supports_candles(&self) -> bool
pub fn supports_candles(&self) -> bool
Determines whether this ExchangeId supports the collection of
Candle market data.
sourcepub fn supports_order_books(&self) -> bool
pub fn supports_order_books(&self) -> bool
Determines whether this ExchangeId supports the collection of OrderBook snapshot
market data.
sourcepub fn supports_order_book_l2_deltas(&self) -> bool
pub fn supports_order_book_l2_deltas(&self) -> bool
Determines whether this ExchangeId supports the collection of
L2 OrderBook delta market data.
sourcepub fn supports_order_book_l3_deltas(&self) -> bool
pub fn supports_order_book_l3_deltas(&self) -> bool
Determines whether this ExchangeId supports the collection of
L3 OrderBook delta market data.
Trait Implementations
sourceimpl Clone for ExchangeId
impl Clone for ExchangeId
sourcefn clone(&self) -> ExchangeId
fn clone(&self) -> ExchangeId
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for ExchangeId
impl Debug for ExchangeId
sourceimpl<'de> Deserialize<'de> for ExchangeId
impl<'de> Deserialize<'de> for ExchangeId
sourcefn 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>,
sourceimpl Display for ExchangeId
impl Display for ExchangeId
sourceimpl From<ExchangeId> for Exchange
impl From<ExchangeId> for Exchange
sourcefn from(exchange_id: ExchangeId) -> Self
fn from(exchange_id: ExchangeId) -> Self
sourceimpl Hash for ExchangeId
impl Hash for ExchangeId
sourceimpl Ord for ExchangeId
impl Ord for ExchangeId
sourcefn cmp(&self, other: &ExchangeId) -> Ordering
fn cmp(&self, other: &ExchangeId) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialEq<ExchangeId> for ExchangeId
impl PartialEq<ExchangeId> for ExchangeId
sourcefn eq(&self, other: &ExchangeId) -> bool
fn eq(&self, other: &ExchangeId) -> bool
sourceimpl PartialOrd<ExchangeId> for ExchangeId
impl PartialOrd<ExchangeId> for ExchangeId
sourcefn partial_cmp(&self, other: &ExchangeId) -> Option<Ordering>
fn partial_cmp(&self, other: &ExchangeId) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more