- Home
- Finance & Business
- Basana
Basana
A Python async and event driven framework for algorithmic trading, with a focus on crypto currencies
Rating
Votes
0
score
Downloads
0
total
Price
Free
No login needed
Works With
About
](https://github.com/gbeced/basana/actions/workflows/runtests.yml) [ ](https://basana.readthedocs.io/en/latest/) [ [](https://pepy.tech/project/basana)
Basana
Basana is a Python async and event driven framework for algorithmic trading, with a focus on crypto currencies.
Key Features
- Backtesting exchange so you can try your trading strategies before using real funds.
- Live trading at Binance and Bitstamp crypto currency exchanges.
- Asynchronous I/O and event driven.
Getting Started
Installation
$ pip install basana[charts]The examples use TALIpp for the technical indicators, pandas, statsmodels and also Textual if you want to run the Binance order book mirror.
$ pip install talipp pandas statsmodels textualDownload and unzip samples or clone the GitHub repository.
Backtest a pairs trading strategy
- 1.Download historical data for backtesting
```
$ python -m basana.external.binance.tools.download_bars -c BCH/USDT -p 1h -s 2021-12-01 -e 2021-12-26 -o binance_bchusdt_hourly.csv $ python -m basana.external.binance.tools.download_bars -c CVC/USDT -p 1h -s 2021-12-01 -e 2021-12-26 -o binance_cvcusdt_hourly.csv
```
- 1.Run the backtest
```
$ python -m samples.backtest_pairs_trading
```
Binance Order Book mirror
The following example demonstrates how to maintain a synchronized local copy of a Binance order book using Basana's event-driven architecture. It initializes the order book from a REST API snapshot, then continuously updates it with real-time diffs from a WebSocket stream while periodically verifying consistency against fresh snapshots to handle potential synchronization issues.
Use the following command to run the example:
$ python -m samples.binance_order_book_mirrorThe mirroring code can be found here.
The Basana repository comes with a number of examples you can experiment with or use as a template for your own projects:
Note that these examples are provided for educational purposes only. Use at your own risk.
Documentation
https://basana.readthedocs.io/en/latest/
Help
You can seek help with using Basana in the discussion area on GitHub.
Don't lose this
Three weeks from now, you'll want Basana again. Will you remember where to find it?
Save it to your library and the next time you need Basana, it’s one tap away — from any AI app you use. Group it into a bench with the rest of the team for that kind of task and you can pull the whole stack at once.
⚡ Pro tip for geeks: add a-gnt 🤵🏻♂️ as a custom connector in Claude or a custom GPT in ChatGPT — one click and your library is right there in the chat. Or, if you’re in an editor, install the a-gnt MCP server and say “use my [bench name]” in Claude Code, Cursor, VS Code, or Windsurf.
a-gnt's Take
Our honest review
This plugs directly into your AI and gives it new abilities it didn't have before. A Python async and event driven framework for algorithmic trading, with a focus on crypto currencies. Once connected, just ask your AI to use it. It's completely free and works across most major AI apps. This one just landed in the catalog — worth trying while it's fresh.
Tips for getting started
Tap "Get" above, pick your AI app, and follow the steps. Most installs take under 30 seconds.
Your data stays between you and your AI — nothing is shared with us or anyone else.
What's New
Imported from GitHub
Ratings & Reviews
0.0
out of 5
0 ratings
No reviews yet. Be the first to share your experience.