Barter-Integration
High-performance, low-level framework for composing flexible web integrations. The core Socket abstraction provides customisable communication over any asynchronous protocol (WebSocket, FIX, etc.), with built-in translation between server & client data models.
Utilised by other Barter trading ecosystem crates to build robust financial exchange integrations,
primarily for public data collection & trade execution. It is:
- Low-Level: Translates raw data streams communicated over the web into any desired data model using arbitrary data transformations.
- Flexible: Compatible with any protocol (WebSocket, FIX, etc.), any input/output model, and any user defined transformations.
See: Barter, Barter-Data & Barter-Execution
Overview
Barter-Integration is a high-performance, low-level framework for composing flexible web integrations. It presents an extensible core abstraction called the ExchangeSocket. At a high level, an ExchangeSocket is made up of a few major components:
- Inner Socket that implements the Stream & Sink trait.
- ProtocolParser trait implementation that is capable of parsing the input messages from a given protocol (eg/ WebSocket, FIX, etc.) and deserialising into some output.
- Transformer trait implementation that transforms any input into an iterator of outputs.
Example
Binance tick-by-tick Trade consumer with Barter-Data.
use ;
use ;
use Decimal;
use connect_async;
use Deserialize;
use json;
use Add;
async
For a larger, "real world" example, see the Barter-Data repository.
Getting Help
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.
Contributing
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.
Related Projects
In addition to the Barter-Integration 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.Barter-Data: A high-performance WebSocket integration library for streaming public data from leading cryptocurrency exchanges.Barter-Execution: Financial exchange integrations for trade execution - yet to be released!
Roadmap
- Add new default ProtocolParser implementations to enable integration with other popular systems such as Kafka.
Licence
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Barter-Integration by you, shall be licensed as MIT, without any additional terms or conditions.