Crate barter_data
source ·Modules
Initialises
MarketStream
s for an arbitrary number of exchanges using generic Barter
Subscription
s.Contains
Subscriber
& ExchangeMapper
implementations for specific exchanges.! # Barter-Data
Core data structures to support consuming
MarketStream
s.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.
[
Stream
] supertrait for streams that yield MarketEvent
s. Provides an entry-point abstraction
for an ExchangeStream
.Trait that defines how a subscriber will establish a
WebSocket
connection with an exchange,
and action Subscription
s. This must be implemented when integrating a new exchange.Type Definitions
Convenient type alias for an
ExchangeStream
utilising a tungstenite WebSocket