A high-performance WebSocket integration library for streaming public data from leading cryptocurrency exchanges - batteries included. It is: * Normalised: Barter-Data's unified interface for consuming public WebSocket data means every Exchange returns a normalised data model. * Real-Time: Barter-Data utilises real-time WebSocket integrations enabling the consumption of normalised tick-by-tick data. * Easy: Barter-Data's simple ExchangeClient interface allows for easy & quick setup. * Extensible: Barter-Data is highly extensible, and therefore easy to contribute to via new integrations!
Note: Barter-Data is recommended for use with the [Barter
].
[API Documentation] | [Chat]
Barter-Data is a high-performance WebSocket integration library for streaming public data from leading cryptocurrency exchanges. It presents an easy to use, extensible, interface that can deliver normalised exchange data in real-time. At a high level, it provides a few major components: * ConnectionHandler that manages the WebSocket connection (ping-pongs, re-connections, rate-limiting) and actions subscription requests on behalf of an Exchange Client implementation (eg/ Binance Exchange Client). * Unified ExchangeClient trait that enables easy extensibility, ease of use, and the delivery of a normalised data model to downstream consumers.
Binance tick-by-tick Trade consumer with Barter-Data.
```rust,norun use barterdata::client::binance::Binance; use barterdata::client::ClientConfig; use barterdata::ExchangeClient; use tokio_stream::StreamExt;
async fn main() -> Result<(), Box
// Subscribe & consume normalised Trade stream
let mut trade_stream = binance
.consume_trades(String::from("btcusdt"))
.await?;
// Loop over arriving Trades
while let Some(trade) = trade_stream.next().await {
// Do something with normalised Trade
println!("{:?}", trade);
}
}
``
**For a larger, "real world" example, see the [
Barter`] repository.**
Firstly, see if the answer to your question can be found in the [API Documentation]. If the answer is not there, I'd be happy to help to [Chat] and try answer your question via Discord.
:tada: Thanks for your help in improving the barter ecosystem! Please do get in touch on the discord to discuss development, new features, and the future roadmap.
In addition to the Barter-Data crate, the Barter project also maintains:
* [Barter
]: High-performance, extensible & modular trading components with batteries-included. Contains a
pre-built trading Engine that can serve as a live-trading or backtesting system.
This project is licensed under the [MIT license].
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tokio by you, shall be licensed as MIT, without any additional terms or conditions.