Quick answer
Blankly is an open-source Python framework for writing a trading strategy once and running it as a backtest, paper bot or live bot across stocks (Alpaca), crypto (Coinbase, Binance, Kraken) and forex (OANDA). Development has slowed since 2024, so check recent commits before depending on it.
Blankly at a glance
- Category
- Backtest + live trading engines
- Language
- Python
- License
- LGPL-3.0
- Does
- Backtesting, Live trading, Paper trading
- Markets
- Stocks, Crypto, Forex
- Best for
- Quick multi-exchange prototypes in stocks, crypto and FX.
- In AlgoGP
- Use the exported strategy object from your own code
Pick it if
Quick multi-exchange prototypes in stocks, crypto and FX.
Watch out for
Low activity since 2024.
Blankly strengths and limitations
Strengths
- Simple event callbacks and uniform exchange interface.
- Backtest, paper and live with the same code.
Limitations
- Low activity since 2024.
- Smaller ecosystem than Freqtrade or Lumibot.
Blankly example
pip install blanklyimport blankly
def price_event(price, symbol, state: blankly.StrategyState):
state.interface.market_order(symbol, "buy", blankly.trunc(state.interface.cash / price, 2))
strategy = blankly.Strategy(blankly.Alpaca())
strategy.add_price_event(price_event, "MSFT", resolution="1d")
strategy.backtest(to="1y")Use Blankly with AlgoGP
AlgoGP does not add Blankly 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 Blankly 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 Blankly
Feed Blankly’s bars to
StrategyBridge, place the returned orders with Blankly, and report fills back withsync().
Blankly connects to Alpaca, Coinbase Advanced Trade, Binance, Kraken, OANDA. Each guide shows how to create the API key, which you can store in the project’s Keys & secrets.
Blankly: frequently asked questions
Is Blankly still maintained?
Commits have slowed; evaluate recent activity and consider Lumibot or Freqtrade.
Blankly alternatives
- LumibotPythonBeginner-friendly Python framework from Lumiwealth: one Strategy class for backtesting and live trading stocks, options, futures and crypto.
- FreqtradePythonThe most popular open-source crypto trading bot: Python strategies, backtesting, hyperopt, FreqAI machine learning, dry-run and Telegram/web control.
- JessePythonPython crypto trading framework with a clean strategy API, accurate multi-timeframe backtests, optimization and a live-trading plugin.
- QuantConnect LEANC#, PythonThe open-source engine behind QuantConnect: event-driven backtesting and live trading in C# or Python across equities, options, futures, FX and crypto.
Independent guide. AlgoGP is not affiliated with Blankly. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.