CLI tool
51bitquant/howtrader avatar
51bitquant/howtrader

HowTrader is a crypto quant framework forked from VNPY

Howtrader: A crypto quant framework for developing, backtesting, and executing your own trading strategies. Seamlessly integrates with TradingView and other third-party signals. Simply send a post request to automate trading and order placement. Supports Binance and Okex exchanges.

965 stars336 forksPythonMIT

At a glance

What is it?
HowTrader takes the VNPY event engine architecture and adapts it for crypto, with Binance and OKX gateways, a TradingView integration that turns third-party alerts into orders, and a set of changes that matter for money, most of all replacing floats with Decimal in the order and trade objects. The project describes itself as a framework for developing, backtesting and executing trading strategies.
Who is it for?
HowTrader fits a developer who already knows the VNPY style of event driven trading and wants the same shape applied to crypto exchanges, with the Decimal change alone removing a class of rounding bug from an order book.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 138 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

VNPY, adapted for crypto

HowTrader explains its own name as how to be a trader, especially a quant trader, and the project is a fork of VNPY. The core codes, functions and usages are described as pretty similar to VNPY, but the fork is easier to install and use, and it fixes some bugs and adds more functions and strategies to the framework, with the TradingView signals and grid strategies extended into it. The packaging file's own description reads: an open source quantitative trading framework developed by traders, for traders, written mainly in Python with C++ for the low layer and performance sensitive infrastructure, where institutional investors and professional traders can develop strategies with the Event Engine Strategy Module and route orders to their desired destinations. What the crypto adaptation changes is the exchange layer and the set of strategies, not the architecture, which is why the differences section is short and specific.

Decimals instead of floats, and a different callback order

The differences from VNPY are listed as four points, and the first is the one that matters most for money. For OrderData, TradeData and ContractData the fork replaces float with Decimal to meet the precision, and those classes are defined in the howtrader.trader.object module. The second is the update sequence for the on_order and on_trade callbacks. In VNPY the on_order is always updated before the on_trade if the order was traded, and in the CTA strategy the self.pos position data was calculated in the on_trade callback, so getting the latest position meant keeping an extra variable. HowTrader pushes the on_trade before the on_order callback to solve that, and the example in the README shows the rewritten handler, which also filters out orders that are not in sequence by comparing the traded difference against the last known order. The third difference is the gateways, where issues such as disconnecting from the exchange and reconnecting are solved. The fourth is the TradingView application for receiving third party signals, in the howtrader.app.tradingview module.

Binance spot needs a key you generate yourself

A whole section of the README is devoted to key configuration, and it is the most practically important thing on the page. The Binance Spot WebSocket API mandates the use of the Ed25519 asymmetric encryption algorithm for signing, so you must use a self-generated method when creating API keys, and system-generated keys cannot be used for the Spot WebSocket interface. The procedure is that you create a self-generated key in the Binance API management page, generate an Ed25519 key pair with the official asymmetric key generator or with OpenSSL, and upload the public key to complete the key creation. Then the API permissions matter. You check Spot and Margin Trading, you mandatorily enable IP whitelisting and add the address of the machine running HowTrader, and the documentation says to check only the necessary permissions and not to enable high-risk permissions such as withdrawal or transfer. The Binance Futures API is not subject to this restriction, so a futures-only deployment can use a standard system-generated key.

Conda first, then pip from the repository

The installation guide is written for a conda workflow, because the framework depends on pandas and numpy and the author recommends Anaconda. The steps are to install Anaconda and remember to add conda to the system path, to install git, to create a virtual environment, to activate it and to install the package from the repository. The environment creation and the install are the two commands that matter:

bash
conda create -n mytrader python==3.9
bash
pip install git+https://github.com/51bitquant/howtrader.git

To update to the latest version, the same pip command is run with the -U flag. There is also a documented recovery path, since if the environment already exists with a different Python version it can be removed and recreated, and if conda cannot be found you may need to reinstall Anaconda or adjust the path. A separate section covers the TA-Lib installation, since a failure to install HowTrader on Windows is usually a TA-Lib problem, and the guide walks through the detail for that case.

The dependency set tells you what kind of tool this is

The install requirements list is the clearest description of the framework. The interface layer is PySide6 with pyqtgraph for plotting and QDarkStyle for the theme, and the presence of a main_window.py at the top level of the repository says the graphical application is part of the product, not an afterthought. The data layer is peewee for the relational store and pymongo for MongoDB, so a strategy can log to either. The numeric and analysis stack is numpy, pandas, matplotlib, seaborn and plotly, and deap is present, which is a differential evolution library and points at genetic programming as one of the strategy research techniques in scope. The network layer is requests, aiohttp and Flask, and Flask is the interesting one because it is how a TradingView webhook reaches the process. The rest is standard, simplejson, pytz, tzlocal, importlib-metadata and cryptography. The requirements file pins all of them to specific versions, and those pins are from 2023, which is the main practical caveat of the whole project.

Examples, scripts and the event engine in practice

The repository is arranged so that each capability has a runnable example. The examples/ directory holds a backtest demo, two data download demos, a main window example, a no_ui example that runs without the interface, portfolio backtesting and a spread backtesting demo, a trade by trade example, a TradingView script example, a data_analysis/ directory and a strategies/ directory with the strategies themselves. The top level mirrors that structure with cta_script.py, tv_script.py, cta_okx_script.py, crawl_data.py for data collection, main_window.py and a start.sh, plus a docker/ directory for a containerised run. The framework's own documentation is in docs/ and there is a separate Chinese README, which matches the project being developed by a Chinese trading group and explains why the documentation is bilingual.

The release history has stalled

The project is MIT licensed and the packaging file credits the vn.py team and 51bitquant, with the upstream project URL of vnpy.com. The release history is the thing to weigh. The listed versions are V3.3.8 from 2023-07-12, 3.2.0 from 2022-07-12 and 2.1.8.0 from 2020-12-29, and the last push to the repository was on 2026-06-07, so the code is being touched but no new tagged version has been cut in a long time. The version number itself is not in the setup file, it is parsed out of the version assignment in howtrader/__init__.py, which is a small sign of a project that installs from the repository rather than from a release. The practical consequences are that you should install from git, as the documentation itself instructs, and that you should expect to deal with the dependency pins yourself, since the requirements file still refers to Python 3.9 era packages and a Flask 2.3.2 release.

Editorial conclusion

HowTrader fits a developer who already knows the VNPY style of event driven trading and wants the same shape applied to crypto exchanges, with the Decimal change alone removing a class of rounding bug from an order book. It does not fit a team that wants an actively maintained framework on a modern dependency set, because the pinned versions date from 2023 and the newest tagged release is from 2023 as well, and it does not fit someone who wants to run it on a clean machine without a conda environment. Before you start, read the Binance Ed25519 section, because the spot WebSocket API will not accept a system-generated key and the setup is a genuine obstacle, and check the pinned versions in requirements.txt against what your own environment already has.

Frequently asked questions

What is HowTrader?

It is a crypto quantitative trading framework for developing, backtesting and executing trading strategies, forked from VNPY, with the core event engine architecture kept but the gateways changed for crypto exchanges and TradingView signals added for automated order placement.

How does HowTrader differ from VNPY?

OrderData, TradeData and ContractData use Decimal instead of float in the howtrader.trader.object module, the on_trade callback is pushed before on_order so the position data is current, the gateways were reworked to handle disconnections and reconnection, and there is a TradingView application module.

Why do I need a self-generated Ed25519 key for Binance?

The Binance Spot WebSocket API mandates Ed25519 signing, so system-generated API keys cannot be used for that interface. You generate an Ed25519 key pair, upload the public key, enable Spot and Margin Trading, and enable IP whitelisting for the machine running HowTrader. The futures API has no such restriction.

How do I install HowTrader?

Install Anaconda, create a conda environment with conda create -n mytrader python==3.9, activate it, and install the package with pip install git+https://github.com/51bitquant/howtrader.git, adding -U to update. A separate section covers installing TA-Lib, which is the usual cause of a failed install on Windows.

Is HowTrader still updated?

The last push was on 2026-06-07, but the newest tagged release is V3.3.8 from 2023-07-12, after 3.2.0 in July 2022 and 2.1.8.0 in December 2020. The package is installed from git rather than from a release, and the licence is MIT.

Official sources

  1. 51bitquant/howtrader on GitHub
  2. Issues
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/51bitquant-howtrader.svg)](https://hysenlabs.com/projects/51bitquant-howtrader)

Was this useful?