Crate barter_data
source · [−]Modules
Initialises MarketStreams for an arbitrary number of exchanges using generic Barter
Subscriptions.
Custom DataErrors generated in barter-data.
Contains Subscriber & ExchangeMapper implementations for specific exchanges.
Core data structures to support consuming MarketStreams.
Enums
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 is a many-to-one relationship between
an ExchangeId and an exchange name.
Traits
Trait that defines how to translate between exchange specific data structures & Barter data structures. This must be implemented when integrating a new exchange.
Identifiable structures are capable of determining their associated SubscriptionId. Used
by ExchangeTransformer implementations to determine the original Barter Subscription
associated with an incoming exchange message.
Stream supertrait for streams that yield MarketDatas. Provides an entry-point abstraction
for an ExchangeWebSocket.
Trait that defines how a subscriber will establish a WebSocket connection with an exchange,
and action Subscriptions. This must be implemented when integrating a new exchange.
Validators are capable of determining if their internal state is satisfactory to fulfill some
use case defined by the implementor.
Type Definitions
Convenient type alias for an ExchangeSocket utilising a tungstenite WebSocket