Python Trading

Open-source Python projects categorized as Trading

Top 23 Python Trading Projects

  • ccxt

    A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges

    Project mention: How to start a personal quant investing scheme? | | 2023-02-22

    Check out (disclosure: my project). We just added a Binance candles feature where you can construct custom OHLCV candles and TA indicators. You should also check out which has broader exchange support but less order book data management than Hummingbot.

  • vnpy



    ONLYOFFICE Docs — document collaboration in your environment. Powerful document editing and collaboration in your app or environment. Ultimate security, API and 30+ ready connectors, SaaS or on-premises

  • backtrader

    Python Backtesting library for trading strategies

    Project mention: What backtest data would you say is more accurate. | | 2023-03-16

    For this reason I think it's important to have a deep understanding of exactly how the backtesting engine that you are using works. Building your own backtesting engine is the absolute best way to gain this understanding. That is the path I personally chose and I don't regret it! However, that is also a very difficult and time consuming undertaking. So the next best thing is using something that is open source and has a good reputation like backtrader (

  • trump2cash

    A stock trading bot powered by Trump tweets

    Project mention: I feel like this fits here... | | 2022-09-03

    Right! How do ppl not know! Wait until they find out about the "Make Money" api - just a simple button click ..

  • hummingbot

    Hummingbot is open source software that helps you build trading bots that run on any exchange or blockchain

    Project mention: Is it typical for crypto Market Maker to incorporate pending transactions in the mempool as part of their indicator/precursor for placing an ask/bid? | | 2023-05-18

    Correct me if I am wrong, but hummingbot, for example, allows anyone to run their Market Making bots ( with various off-the-shell market making strategies for crypto, and they include both DEXs and CEXs

  • jesse

    An advanced crypto trading bot written in Python

    Project mention: Crypto Algo Platform | | 2022-07-17

    Going to give a try next week.

  • Crypto-Signal - Trading & Technical Analysis Bot - 4,100+ stars, 1,100+ forks

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.


    :mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.

    Project mention: Anyone here built backtest/alpha visualization/exploration dashboard(s)? | | 2023-03-31 offers nice way to zoom backtesting. It has some bugs, but good for visualization.

  • pandas-ta

    Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 130+ Indicators

    Project mention: Help recreating ta-lib python MACDFIX in pure python | | 2023-05-03

    I do not know what is the difference between MACD and MACDFIX but maybe you can take a look how MACD is implemented in pandas_ta library and modify it a bit to achive a behavior you want.

  • mlfinlab

    MlFinLab helps portfolio managers and traders who want to leverage the power of machine learning by providing reproducible, interpretable, and easy to use tools.

    Project mention: mlfinlab: open source library maintained by hudson and thames though much of the content has moved to a subscription model. Idea is to implement academic research in python code and aggregate it as a package. Sources from [Journal of financial data s | | 2022-11-13
  • vectorbt

    Find your trading edge, using the fastest engine for backtesting, algorithmic trading, and research.

    Project mention: Is there any python libraries to backtest buy and sell signals with dates? | | 2022-06-14

    For exactly this I use this it’s really a powerful tool and you can tons of things with it. Recently the developer decided to maintain it but not adding new features, which from now on will be released on the pro version. However, the free version is still very valuable, incredibly fast and suitable for basic to intermediate tasks.

  • freqtrade-strategies

    Free trading strategies for Freqtrade bot

  • ib_insync

    Python sync/async framework for Interactive Brokers API

    Project mention: IBKR Trading | | 2023-05-12
  • OctoBot

    Cryptocurrency trading bot using technical analysis based strategy with an advanced web interface

  • coinbasepro-python

    The unofficial Python client for the Coinbase Pro API

    Project mention: Unable to connect to coinbase pro API | | 2023-05-21

    I'm trying to set up algo trading through the Blankly Python library. I've generated my Coinbase Pro API keys, but when I try to enter them it always tells me that it failed to connect, and to check to make sure my keys are correct. I'm quite certain that they are, and I made a new set of API keys just in case something was wrong with the first set. I also cannot create an "authenticated client" as described on their readme because the cbpro library is out of date and currently incompatible with blankly.

  • cryptofeed

    Cryptocurrency Exchange Websocket Data Feed Handler

    Project mention: cryptofeed: NEW Data - star count:1655.0 | | 2023-02-12
  • gym-anytrading

    The most simple, flexible, and comprehensive OpenAI Gym trading environment (Approved by OpenAI Gym)

    Project mention: Design of an episode/game in RL for quantitative trading? | | 2022-06-24
  • blankly

    🚀 💸 Easily build, backtest and deploy your algo in just a few lines of code. Trade stocks, cryptos, and forex across exchanges w/ one package.

    Project mention: Unified Quant Ecosystem | | 2022-09-21

    Looks interesting.

    I recently came across this newer platform Blankly with similar goals, it has great docs and easy to get started

  • surpriver

    Find big moving stocks before they move using machine learning and anomaly detection

    Project mention: surpriver: Machine learning algo to detect anomaly in equities data. Uses sklearn [IsolationForest]( model and price/volume based technical signals as features us | | 2023-04-01
  • alpaca-trade-api-python

    Python client for Alpaca's trade API

    Project mention: Simple Martingale Bot (willing to pay) | | 2023-03-05
  • Binance-News-Sentiment-Bot

    This is a fully functioning Binance trading bot that takes into account the news sentiment for the top 100 crypto feeds. If you like this project consider donating though the Brave browser to allow me to continuously improve the script.

  • MachineLearningStocks

    Using python and scikit-learn to make stock predictions

    Project mention: Scikit-learn Stock Prediction: using fundamental and pricing data to predict future stock returns. Sklearn's randomforest classifier is trainded and author claimed positive live trading results. Not actively mainained Other Models - star count:1411.0 | | 2023-04-01
  • robin_stocks

    This is a library to use with Robinhood Financial App. It currently supports trading crypto-currencies, options, and stocks. In addition, it can be used to get real time ticker information, assess the performance of your portfolio, and can also get tax documents, total dividends paid, and more. More info at

    Project mention: Robin_Stocks sudden access failure | | 2023-02-23
  • Sonar

    Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-05-21.

Python Trading related posts


What are some of the best open-source Trading projects in Python? This list will help you:

Project Stars
1 ccxt 28,302
2 vnpy 20,926
3 backtrader 10,750
4 trump2cash 6,187
5 hummingbot 5,886
6 jesse 4,667
7 Crypto-Signal 4,384
8 3,668
9 pandas-ta 3,633
10 mlfinlab 3,404
11 vectorbt 2,867
12 freqtrade-strategies 2,577
13 ib_insync 2,196
14 OctoBot 2,073
15 coinbasepro-python 1,774
16 cryptofeed 1,770
17 gym-anytrading 1,636
18 blankly 1,609
19 surpriver 1,588
20 alpaca-trade-api-python 1,570
21 Binance-News-Sentiment-Bot 1,525
22 MachineLearningStocks 1,470
23 robin_stocks 1,437
TestGPT | Generating meaningful tests for busy devs
Get non-trivial tests (and trivial, too!) suggested right inside your IDE, so you can code smart, create more value, and stay confident when you push.