#backtesting #trading #stock #investment #crypto

barter-execution

High-performance and normalised trading interface capable of executing across many financial venues. Also provides a feature rich simulated exchange.

6 releases

new 0.3.1 Oct 20, 2024
0.3.0 Apr 16, 2023
0.2.2 Dec 3, 2022
0.2.1 Oct 10, 2022
0.1.0 Jul 12, 2022

#678 in Magic Beans

Download history 5/week @ 2024-07-06 3/week @ 2024-09-21 2/week @ 2024-09-28 1/week @ 2024-10-12 121/week @ 2024-10-19

124 downloads per month

MIT license

640KB
13K SLoC

Barter-Execution

High-performance and normalised trading interface capable of executing across many financial venues. Also provides a feature rich simulated exchange to assist with backtesting and dry-trading.

It is:

  • Easy: ExecutionClient trait provides a unified and simple language for interacting with exchanges.
  • Normalised: Allow your strategy to communicate with every real or simulated exchange using the same interface.
  • Extensible: Barter-Execution is highly extensible, making it easy to contribute by adding new exchange integrations!

See: Barter, Barter-Integration, Barter-Data

Crates.io MIT licensed Build Status Discord chat

API Documentation | Chat

Overview

High-performance and normalised trading interface capable of executing across many financial venues. Also provides a feature rich simulated exchange to assist with backtesting and dry-trading. Communicate with an exchange by initialising it's associated ExecutionClient instance.

Example

For now, see tests/simulated_exchange.rs for a taste.

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.

  • Implement the ExecutionClient trait to integrate a new exchange.

In addition to the Barter-Execution 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-Integration: High-performance, low-level framework for composing flexible web integrations.
  • Barter-Data: High-performance WebSocket integration library for streaming public market data from leading cryptocurrency exchanges.

Roadmap

  • Improve sophistication of the SimulatedExchange.
    • OrderKind::Market & OrderKind::ImmediateOrCancel execution support.
    • Enable many clients to use the exchange simultaneously, pathing the way for simulated order books generated by many market archetype actors.
  • Add many more ExecutionClient implementations for exchanges.

Licence

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Barter-Data by you, shall be licensed as MIT, without any additional terms or conditions.

Dependencies

~12–23MB
~340K SLoC