Build Crypto Bitcoin Trading Bot with Python Binance CCXT — How To Video Tutorials with Code

Building a Crypto Trading Bot with Python on Binance: A series of tutorials, blog posts, videos and discussion around Algo Trading with Cryptocurrency such as Bitcoin and Ethereum

Welcome to ‘Building a Crypto Trading Bot in Python’ web-based tutorial series.

This Medium post will serve as a centralized location for the Youtube Tutorials, Github Code, and links to further reading for this project, which has grown quite extensive with a large community, numerous tutorials, and code which is ready to be deployed on your own system in order to begin trading cryptocurrencies algorithmic with a bot.

I suggest that you bookmark this page in order to return to it while learning about crypto trading bots, as there is quite a lot of material available and I will do my best to this post as a centralized location and ‘guide’ to the material.

Thank you for your interest in this project, my intentions are for you to have learned enough for this course to be able to run, design and develop your own crypto trading strategies!

Join Crypto Bitcoin Trading Bot discussion:
LinkedIn: https://www.linkedin.com/groups/12121918
Telegram: https://t.co/YlGP1zvvw4
Discord: https://discord.gg/9SUghNP
Twitter: Blockchain Engineer — Crypto Trading Bots Twitter
Link to Youtube: Crypto Bitcoin Trading Bots in Python Youtube 
Link to Github: Crypto Bitcoin Trading Bots Python Open Source Code

Attention: Advanced Cryptocurrency Trading Bot (Chapters 5, 6, 7) have been completed.


Introduction to Crypto Trading Bots with Python

Hello and welcome to my post discussing “building an automated cryptocurrency trading bot on Binance with Python”. I begun working on this project in April 2018 due to my interest in cryptocurrency trading, and my previous education and skills with python computer programming.

The goals for this project is to create an open-source software which will trade cryptocurrency on an exchange, such as binance, using strategies to maximize profit while reducing risk.

The main motivation for this project is to create an open-source crypto-trading software that anyone can download, edit & customize to implement their own trading strategies.

There exist many crypto trader bots available, but I believe that a solution where the code is open-source and can be customized to each trader’s goals, time horizon & risk profile is desirable.

Many of the available trading bots are proprietary, while others are in languages other than python (Such as Gekko Trading Bot Software). I wanted a python bot so I could run it on my own computer, and keep tight control over the private keys.

To gain a proper understanding of the goals of this project, please watch the introductory video below:

Cryptocurrency Trading: Numerous Opportunities (and Risks)

Problem: Cryptocurrency is a new form of money created around the year 2009 through a white-paper introduced by Satoshi Nakamoto to digitize and store ‘value’ through the internet, known as Bitcoin. Since this time, thousands of other cryptocurrencies have been created enabling a tremendous opportunity for future globally-facilitated transactions.

The current market valuation for all cryptocurrencies is near $400 billion USD at the time of writing, presenting a tremendous opportunity for growth of invested capital as evidenced by the drastic increase in cryptocurrency prices and market caps in 2017.

On the opposite side of this opportunity, the cryptocurrency market contains high volatility and numerous risks.

Much of the current wisdom about cryptocurrency investing is based around ‘buy & hodl’, but an automated solution is desired with the aims of preserving & increasing invested capital with limited trader involvement. Given the tremendous opportunity (and equally large risks involved), a software is desired to aid investment in cryptocurrency by both newbies & experienced cryptocurrency investors.

Design of Cryptocurrency Trading Software

Solution: A software solution is required which can invest funds in cryptocurrency markets (such as Binance) which will buy, sell and hold according to various strategies to increase profit in a way that is easily managed, highly reliable and autonomous.

How To Design Crypto Trading Bot in Python

Automated Trading Bots are very common on major stock exchanges such as the New York Stock Exchange due to their functionality, speed and pre-defined trading rules.

Example of ‘Scalping’ Trading Strategy Employed by Crypto Trading Bot with Price Entry/Exit

Crypto Trading Bot Youtube Series

In addition to blog posts and podcasts about this topic, I will create a new video series I will be doing on Youtube titled ‘How To Build an Automated Trading Bot (on Binance with Python)’, which is a technical guide to building a trading bot that will:

  • Purchase and Sell cryptocurrency on the Binance Exchange in a way which maximizes Return on Investment while Reducing Risk.
  • Portfolio Management- Create a daily/weekly/monthly profit & loss statement Tracking Wins & Losses, an ‘index’ of 25 largest Market Cap Coins.
  • Easily customizable while ability to start running as packaged, varying time horizons, risk profile.

I am interested to create an automated algorithmic bot for trading cryptocurrencies due to the advantages of bots and the capabilities provided by software. I documented almost every portion of this journey so that anyone else who would like to modify or replicate the binance trader bot code would be well-informed on many of the design choices I made while building this bot.

Market Making Crypto Trading Bot in Python

Background Technical Analysis — Crypto Trading Reading

A Beginner’s guide to Crypto Trading Bots is available from Blockonomi.com which gives a fantastic overview of bots and the strategies implemented to provide profits.

Current Cryptocurrency Trading Bots/Sites

Three major codes have been developed for trading on Binance with Python:

Chapter 2: Functionality of Cryptocurrency Trading Bot

Purchase — Sell — Trade Cryptocurrency Bot Features

Crypto-Signal will be incorporated in this project for TA Signal Analysis.

  • Data Collection & Analysis
  • Swing Trading
  • Bollinger Bands — Stochastic RSI
  • Blade Runner

Portfolio Management

  • Varying Long-Medium-Short term focus strategies
  • Protecting/Growing Capital Invested
  • Bet-sizing based on high/low-risk strategies

Custom Features

  • Ability to modify & test various strategies

Conclusion-Future Work

  • Create Youtube Series with coding explanation & introduction to cryptocurrency Trading/Technical Analysis (TA) — possible collaboration with Professional Cryptocurrency Traders & Developers
  • Incorporate with Twitter/Discord to add functionality, such as placing an order through discord, or supply requested information
  • Test various A.I. and Machine Learning based Technical Analysis

Additional Resources

Outline of ‘Cryptocurrency Trading Bot’ Online Guide

Chapter 1: Setting Up CryptoTrading Bot Environment in Python

Chapter 2: Introduction to CryptoTrading Bot

  • Buy & Sell Strategies
  • Portfolio Management
  • Risk Management

Chapter 3: Portfolio/Index Indicators

The focus of Chapter 3 is to add Portfolio functionality to the Automated Trading Bot on Binance project. Creating a portfolio is a straightforward exercise done in many college courses, so I would like to incorporate an already completed python project with significant functionality.

  • Create Portfolio functionality of Cryptocurrencies with deposits, withdrawals, buy & sell — denominated in Satoshis — Daily/Weekly/Monthly Profit & Loss Reports
  • Ability to create ‘play money’ portfolios, perform advanced portfolio tasks such as Indexing Cryptocurrency profile (Hodl Bot)
  • All Data Saved to .csv files , can easily be edited in Microsoft Excel
  • Incorporated with Pandas Data Structure for Data Analysis & Matplotlib for Data Visualization

A template design functionality with these features is available from “Tracking a Portfolio with Python” and all code published on github as ‘Portfolio Tracker’, which will be forked and modified for tracking Cryptocurrency Portfolio on Binance.

A great project called “Cryptrack by Herschee” is used for tracking a cryptocurrency portfolio with publicly available code, pulling from coinmarketcap to determine hourly/daily/weekly gains & losses. This code will be included in the algorithmic trading bot project as an initial functionality before implementing ‘Portfolio Tracker’ functionality.

Chapter 4: Collecting & Analyzing Historic Data from Binance

Chapter 5: Tracking Profit & Loss — Comparing to ‘Index’

Chapter 6: Developing new strategies based on historic data

Chapter 7: Incorporating with Social Media and Discord through Bots