Crypto/Bitcoin Trading Bot in Python — July 2018 Update

--

I first began coding a crypto / Bitcoin trading bot in Python in April 2018 as a way to automate my trades of cryptocurrency in a way that is data-based to consistently return a profit, and maintained a youtube channel of the coding and thought process behind the crypto trading bots.

Introduction Youtube Video to Crypto Trading Bots in Python with Binance

The motivation to code a bot, rather than use commercially available projects, stemmed from the desire to maintain control over my own private keys, but also be able to implement whatever functionality I desire in my own crypto trading bot — and testing various inputs such as Sentiment Analysis based on twitter posts.

Example Output of Bitcoin Sentiment Analysis Crypto Trading Bot

Due to the increased development of these bots, my own limits in programming skill and knowledge have been challenged on a daily basis. Fortunately, a tremendous community has grown from this original project idea, including traders, developers and business-persons, which provides a unique perspective on the functionality (and how to) behind these bots.

The purpose of this blog post is to outline and detail the current development status and goals of the python crypto/Bitcoin Trading Bot project which has developed over the past couple of months. I will be recording an audio-call of many of the most important developers/contributors to this project which I will make publicly available.

Historic Development

All code is available through http://www.github.com/Roibal

The current status of various portions of the project are available here:

  1. Basic Python-Binance Bot — The first crypto trading bot I began developing, this bot has limited functionality and serves as a base for more complex crypto botting projects.
  2. Advanced Crypto Trading Bot — After learning about ccxt, a library to extend botting functionality to all exchanges and currencies, the Basic Binance Bot was converted to use with CCXT and further developments were added.
  3. Triangular Arbitrage Cryptocurrency Bot — A bot was developed extensively to perform Triangular Arbitrage on the Binance Exchange. Current functionality includes paper trading (with and without fees) and collecting/visualizing data. We are currently very close to having an operational buy/sell tri arb bot, however, it turns out that the triangular arbitrage strategy is not as profitable (on binance with ETH/USDT/BTC/BNB) as originally anticipated.
  4. Sentiment Analysis Bot — A quick side project which I developed, the Sentiment Analysis Bot will utilize a python library to analyze the sentiment of tweets based around the discussion of ‘bitcoin’, and will track positive/negative/neutral sentiment over time in order to make profitable trades. Currently the bot collects, analyzes data and has buy/sell signaling.
  5. TradingView Signals Analysis Bot — Contributor Michael Goode has developed a python script which will scrape the buy/sell signal recommendations from tradingview.com for numerous coins. I modified this code to run continuously and for a larger number of coins. This will serve as a base for either a signal-output platform and/or buy/sell signals for an automated trading bot.

Current Development — Priorities & Tasks

  1. Basic Python-Binance Bot — Currently this bot is not a priority due to the limited functionality and dependence on python-binance library, limiting its functionality to the Binance exchange. Current usage of this bot is as a study tool for introductory lessons to crypto trading bots.
  2. Advanced Crypto Trading Bot — Current development on this project has stalled due to increased interest in Triangular Arbitrage and obtaining proper/valid signals. More than likely this bot will be incorporated with signals from trading view in order to complete our desired automated trading functionality.
  3. Triangular Arbitrage Cryptocurrency Bot — After further research and development, it was discovered that tri arb opportunities on binance are VERY slim margins (0.001%), and disappear incredibly quick (1/4 of 1 second). Further research has identified possible triangular arbitrage markets on binance and will need to be investigated/analyzed further.
  4. Sentiment Analysis Bot — The Sentiment Analysis Bot has just been modified to produce Buy/Sell signals when market is overly positive or negative, and the output from collected data was developed to be directly posted to twitter. After Khal developed a A Stop-Loss/Profit-Taking script, I believe the Sentiment Analysis bot is very close to trading, just a matter of position sizing, timing, etc. Most likely the Sentiment Analysis Bot will be incorporated as a signal within another bot.
  5. TradingView Signals Analysis Bot — A major focus of development is the Trading View Signal Scraper by Michael Goode, due to the quantitative nature and high-quality of the signals produced by trading view, and the ability to apply Khal’s code directly with the signals to produce a crypto trading bot that should fare quite well. I have modified Michael’s original code to collect data continuously, on a larger set of coins, and record this information on a spread-sheet/CSV file.

Future Development — Priorities & Tasks

Future research in this arena is primarily focused on two areas: Analyzing signal quality (from Sentiment Analysis Bot and TradingView Bot) and implementing trading functionality so that we will have a crypto trading bot code that can begin to be evaluated by teams and individuals within our current technological ecosystem.

Tasks:

  • Build SIMPLE trading bot from TradingView Signals and Profit-Taking/Stop-Loss code (eventually incorporate Sentiment Analysis Signals)
  • Add Trading Functionality (Buy/Sell) to Sentiment Analysis Bot
  • Combine Advanced Crypto Trading Bot with signals from TradingView signals Bot
  • Continue researching profit opportunities and application of Triangular Arbitrage Bot

On a more large-scale, wide-lens view, I would ultimately like to condense the trading signals output into a human (and computer/bot) readable format which can be used for manually (or bot) trading, and make these signals available every 6 hours, for a total of 4 times per day. This data would be output in a ‘newsletter’ format and will include analysis and suggestions from the most successful crypto traders.

Conclusion

The main purpose of this post was to describe the process and current developments of this project, in order to create a software which can successfully trade crypto based on data and algorithms developed by experienced traders & developers.

In conclusion, significant research and development has gone into the crypto-Bitcoin Trading Bots with the result in many functional scripts and codes which now must be united into one cohesive whole that can be tested, analyzed and ultimately implemented to trade cryptocurrency profitably.

--

--

Blockchain Engineer - Crypto Trading Bots

@BlockchainEng on Twitter. Crypto Trading Bots Programmer. Blockchain Engineer. Crypto Investor - Trader. ICO Advisor. realestateblockchain1@gmail.com