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:
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.

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:

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.

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.

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

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

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

Chapter 2: Functionality of Cryptocurrency Trading Bot

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

  • Data Collection & Analysis
  • Swing Trading
  • Bollinger Bands — Stochastic RSI
  • Blade Runner
  • Varying Long-Medium-Short term focus strategies
  • Protecting/Growing Capital Invested
  • Bet-sizing based on high/low-risk strategies
  • Ability to modify & test various strategies
  • 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

Outline of ‘Cryptocurrency Trading Bot’ Online Guide

  • Buy & Sell Strategies
  • Portfolio Management
  • Risk Management

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.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store