Quick answer
Barter is a family of open-source Rust crates for building trading systems: barter (an event-driven engine for live, paper and backtest), barter-data (normalized WebSocket market data from exchanges such as Binance, Bybit, OKX, Kraken and Coinbase), barter-execution and barter-integration. It suits developers who want Rust performance and type safety.
Barter at a glance
- Category
- HFT & market making
- Language
- Rust
- License
- MIT
- Does
- Backtesting, Live trading, Paper trading, Market data, Order execution
- Markets
- Crypto
- Best for
- Rust developers building low-latency crypto systems.
- In AlgoGP
- Use the exported strategy object from your own code
Pick it if
Rust developers building low-latency crypto systems.
Watch out for
Rust only.
Barter strengths and limitations
Strengths
- Rust performance and safety.
- Normalized multi-exchange streams.
- Modular crates you can adopt piecemeal.
Limitations
- Rust only.
- Fewer batteries included than Python frameworks.
Barter example
cargo add barter barter-data barter-executioncargo add barter barter-data barter-execution tokio --features tokio/fullUse Barter with AlgoGP
AlgoGP does not add Barter to projects automatically yet, but nothing stops you using them together. Every AlgoGP project exports plain Python with a framework-neutral strategy object, so you can call it from Barter yourself.
- 1
Design and backtest in AlgoGP
Describe the idea to the copilot and backtest it on AlgoGP’s normalized history.
- 2
Add any bridge to get the adapter core
Adding a bridged framework (for example Backtrader) writes
frameworks/algogp_bridge.py, whoseStrategyBridge.on_bar()returns the orders the strategy wants. - 3
Call it from Barter
Feed Barter’s bars to
StrategyBridge, place the returned orders with Barter, and report fills back withsync().
Barter connects to Binance, Bybit, OKX, Kraken, Coinbase Advanced Trade, Gate (Gate.io), Bitfinex, BitMEX. Each guide shows how to create the API key, which you can store in the project’s Keys & secrets.
Barter: frequently asked questions
Is there a Python framework like Barter?
NautilusTrader has a Rust core with a Python API.
Barter alternatives
- NautilusTraderPython, RustHigh-performance, Rust-core trading platform with a Python API: the same strategy runs in a nanosecond-resolution backtester and live across many venues.
- HftBacktestRust, PythonHigh-frequency backtesting in Rust and Python that models queue position and feed/order latency from full order-book and trade data.
- CryptofeedPythonNormalized real-time crypto market-data feeds (trades, books, funding, liquidations) from dozens of exchanges over WebSockets, with storage backends.
- CCXTPython, JavaScript, TypeScript, PHP, C#, GoOne unified API for 100+ crypto exchanges in Python, JavaScript, PHP, C# and Go: market data, balances and orders with the same calls everywhere.
Independent guide. AlgoGP is not affiliated with Barter. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.