A python crypto trading bot on Binance using RSI in 25 Lines 🚀

Overview

RSI Crypto Trading Bot - Binance

A Crypto Trading Bot on Binance trading BTCUSDT and ETHUSDT using RSI in 25 Lines of Code

Getting Started

Note Python Version 3.7+ is supported

  1. First install Blankly using pip. Blankly is hosted on PyPi.
$ pip install blankly 
  1. Ensure that you have your Binance API Keys connected, check here for more deatils
  2. Run the python file
$ python bot.py 
  1. Woila! You have a working Binance Crypto Trading Bot that trades BTCUSDT and ETHUSDT

Backtest Output

Blankly Metrics: 
Compound Annual Growth Rate (%):   1.0%
Cumulative Returns (%):            2.0%
Max Drawdown (%):                  38.0%
Variance (%):                      4.36%
Sortino Ratio:                     0.18
Sharpe Ratio:                      0.19
Calmar Ratio:                      0.16
Volatility:                        0.02
Value-at-Risk:                     305.38
Conditional Value-at-Risk:         20.38
Risk Free Return Rate:             0.0
Resampled Time:                    86400.0

How does this work?

This uses the blankly package to build a trading strategy in just 25 lines of code. We are able to utilize the Blankly.Strategy object to easily add our rsi_price_event(price, symbol, state) function that handles our core RSI logic that trades when RSI is less than 30 and sells when it is greater than 70.

What is RSI?

RSI or relative strength index is an oscillator that measures the strength of a trend (i.e. when a trend is gaining momentum or losing steam). As it oscillates, it tells us when specific upwards or downward trends are most likely to stop and reverse. This is typically found when an asset is oversold (less than 30) or overbought (greater than 70) and can be used as an indicator, in conjunction with many other metrics to produce a meaningful output.

Resources on RSI

What is RSI? - Investopedia Implementation of RSI

Next Steps

Fork this repository, and start adding in some more indicators to test combinations Take this strategy live by changing it to s.start()

Join our discord and check out our upcoming platform

You might also like...
Trading bot - A Trading bot With Python
Trading bot - A Trading bot With Python

Trading_bot Trading bot intended for 1) Tracking current prices of tokens 2) Set

Freqtrade is a free and open source crypto trading bot written in Python.
Freqtrade is a free and open source crypto trading bot written in Python.

Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.

An advanced crypto trading bot written in Python
An advanced crypto trading bot written in Python

Jesse Jesse is an advanced crypto trading framework which aims to simplify researching and defining trading strategies. Why Jesse? In short, Jesse is

Free python/telegram bot for easy execution and surveillance of crypto trading plans on multiple exchanges.
Free python/telegram bot for easy execution and surveillance of crypto trading plans on multiple exchanges.

EazeBot Introduction Have you ever traded cryptocurrencies and lost overview of your planned buys/sells? Have you encountered the experience that your

Crypto trading bot that detects surges in the bitcoin price and executes trades.

The bot will be trading Bitcoin automatically if the price has increased by more than 3% in the last 10 minutes. We will have a stop loss of 5% and t

Trading strategy for the Freqtrade crypto bot

NostalgiaForInfinity Trading strategy for the Freqtrade crypto bot Change strategy Add strategies to the user_data/strategies folder and also in the d

trading strategy for freqtrade crypto bot it base on CDC-ActionZone

ft-action-zone trading strategy for freqtrade crypto bot it base on CDC-ActionZone Indicator by piriya33 Clone The Repository if you just clone this r

Automated crypto trading bot as adapted from Algovibes.

crypto-trading-bot Automated crypto trading bot as adapted from Algovibes. Pre-requisites Ensure that you have created a Binance API key before procee

Utilizing the freqtrade high-frequency cryptocurrency trading framework to build and optimize trading strategies. The bot runs nonstop on a Rasberry Pi.
Utilizing the freqtrade high-frequency cryptocurrency trading framework to build and optimize trading strategies. The bot runs nonstop on a Rasberry Pi.

Freqtrade Strategy Repository Please test all scripts and dry run them before using them in live mode Contact me on discord if you have any questions!

Owner
Blankly Finance
Blankly is building a platform to enable anyone to build hedge fund level trading algorithms & connect to the cloud with just a few lines of code.
Blankly Finance
This is a DCA crypto trading bot built for Binance written in Python

This is a DCA crypto trading bot built for Binance written in Python. It works by allowing you to DCA at an interval of your choosing and reports back on your average buy price as well as a chart consisting of each DCA.

Andrei 55 Oct 17, 2022
This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio

gateio-trading-bot-binance-announcements This Gateio x Binance cryptocurrency trading bot scans the Binance Announcements page and picks up on new coi

Andrei 1.2k Jan 1, 2023
Cryptocurrency Trading Bot - A trading bot to automate cryptocurrency trading strategies using Python, equipped with a basic GUI

Cryptocurrency Trading Bot - A trading bot to automate cryptocurrency trading strategies using Python, equipped with a basic GUI. Used REST and WebSocket API to connect to two of the most popular crypto exchanges in the world.

Francis 8 Sep 15, 2022
Crypto-trading-simulator - Cryptocurrency trading simulator using Python, Streamlit

Crypto Trading Simulator Run streamlit run main.py Dependency Python 3 streamli

Brad 12 Jul 2, 2022
Aio-binance-library - Async library for connecting to the Binance API on Python

aio-binance-library Async library for connecting to the Binance API on Python Th

GRinvest 10 Nov 21, 2022
This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. If you like this project please consider donating via brave. Thanks.

This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. The bot f

Andrei 157 Dec 15, 2022
A muti pairs martingle trading bot for Binance exchange.

multi_pairs_martingle_bot English Documentation A muti pairs martingle trading bot for Binance exchange. Configuration { "platform": "binance_futur

51bitquant 62 Nov 16, 2022
null 471 Dec 24, 2022
Trading through Binance's API using Python & sqlite

pycrypt Automate trading crypto using Python to pull data from Binance's API and analyse trends. May or may not consistently lose money but oh well it

Maxim 4 Sep 2, 2022