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

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
A python wrapper for the mangadex API V5. Work in progress

mangadex A python wrapper for the mangadex API V5. It uses the requests library and all the aditional arguments can be viewed in the Official Mangadex

Eduardo Ceja 27 Dec 14, 2022
Explorer is a Autonomous (self-hosted) Bittorrent Network Search Engine.

Explorer Explorer is a Autonomous (self-hosted) Bittorrent Network Search Engine. About The Project Screenshots Supported features Number Feature 1 DH

51 Jun 14, 2022
My Discord Bot that I used to learn Python. Please disregard the unstructured code!

Botsche My personal Discord Bot. To run this bot, change TOKEN in config.ini to your Discord Bot Token, which can be retrieved from your Discord Dev

Mats Voss 1 Nov 29, 2021
A Multi-Tool with 30+Options.

A Multi-Tool with 30+Options.

Mervin404 15 Apr 12, 2022
GBSLocalLauncher - A script to compose ENV file for Local Compose

GBSLocalLauncher This is a script to compose ENV file for Local Compose. It crea

2 Jan 27, 2022
Date Time Userbot With Python

DATE_TIME_USERBOT An Telegram Bot By @Pythone_3 Config Vars API_ID : Telegram API_ID, get it from my.telegram.org/apps API_HASH : Telegram API_ID, get

Sinzz-sinan-m 2 Oct 20, 2021
Telegram Bot to Connect Strangers

Telegram Bot to Connect Strangers How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOKEN: export TELEGRAM_BOT_TOKEN=your_t

PyTopia 12 Dec 24, 2022
Discord-Lite - A light weight discord client written in Python, for developers, by developers.

Discord-Lite - A light weight discord client written in Python, for developers, by developers.

Sachit 142 Jan 07, 2023
The gPodder podcast client.

___ _ _ ____ __ _| _ \___ __| |__| |___ _ _ |__ / / _` | _/ _ \/ _` / _` / -_) '_| |_ \ \__, |_| \___/\__,_\__,_\___|_| |_

gPodder and related projects 1.1k Jan 04, 2023
WhatsApp Multi Device Client

WhatsApp Multi Device Client

23 Nov 18, 2022
Zendesk Ticket Viewer is a lightweight commandline client for fetching and displaying tickets from a Zendesk account provided by the user

Zendesk Ticket Viewer is a lightweight commandline client for fetching and displaying tickets from a Zendesk account provided by the user.

Parthesh Soni 1 Jan 24, 2022
Ein PY-Skript, mit dem tiled-Editor-Maps bearbeitet werden

tilesetCopyrighter Ein PY-Skript, mit dem tiled-Editor-Maps bearbeitet werden kรถnnen fรผgt je Tileset eine custom-Property tilesetCopyright (string) hi

1 Dec 26, 2021
Robocord is a bot created for the Pycord community.

Robocord is a bot created for the community of the Pycord Server. Just a bot created for Pycord Server. You can start pull requests, I will check it and if its good I will add it to the bot. ๐Ÿ‘

Bruce 7 Jun 26, 2022
A Discord bot to scrape textfiles from messages and put them to Hastebin

A Discord bot to scrape textfiles from messages and put them to Hastebin. Intended to use on support servers to help users read textfiles on mobile.

1 Jan 23, 2022
A calculator telegram bot.

Calculator-Bot A calculator telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.com/Fay

Fayas Noushad 33 Nov 30, 2022
A discord.py extension for sending, receiving and handling ui interactions in discord

discord-ui A discord.py extension for using discord ui/interaction features pip package โ–ช read the docs โ–ช examples Introduction This is a discord.py u

34 Dec 29, 2022
A way to export your saved reddit posts to a Notion table.

reddit-saved-to-notion A way to export your saved reddit posts and comments to a Notion table.Uses notion-sdk-py and praw for interacting with Notion

19 Sep 12, 2022
A Telegram bot to download posts, videos, reels, IGTV and a user profile picture from Instagram!

Telegram Bot A telegram bot to download media from Instagram! No API Key or Login Needed! Requirements You must have python installed (of course) You

Simon Farah 2 Apr 10, 2022
Python bindings to the Syncthing REST interface.

python-syncthing Python bindings to the Syncthing REST interface. Python API Documentation Syncthing Syncthing REST Documentation Syncthing Forums $ p

Blake VandeMerwe 64 Aug 13, 2022
Telegram bot for stream music or video on telegram

KYURA MUSIC Telegram bot for stream music or video on telegram, powered by PyTgCalls and Pyrogram Help Need Help me to translate this repo, click the

0 Dec 08, 2022