Crate barter_data
source · [−]Modules
Initialises MarketStreams for an arbitrary number of exchanges using generic Barter
Subscriptions.
Contains Subscriber & ExchangeMapper implementations for specific exchanges.
! # Barter-Data
Core data structures to support consuming MarketStreams.
Test utilities for conveniently generating public MarketEvent types.
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 could be a many-to-one relationship between
an ExchangeId and an Exchange.
Traits
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 MarketEvents. Provides an entry-point
abstraction for an ExchangeSocket.
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.
Type Definitions
Convenient type alias for an ExchangeSocket utilising a tungstenite WebSocket