• Stars
    star
    320
  • Rank 131,067 (Top 3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 2 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easy-to-use multi-strategic automatic trading for Binance Futures with Telegram integration

Binance Futures Trading Bot

Easy-to-use multi-strategic automatic trading for Binance Futures with Telegram integration

Features

  • You can run it fast and it's easy to use.
  • This project can handle multiple strategies at the same time.
  • There are no complexities and no database usage in this project. Even dependencies are a few.
  • It's easy for modifying and customization.
  • It automatically stores recent candles that can be used for machine learning model input.
  • You can read the code for educational purposes.
  • You can be notified with Telegram messages

Run

  1. Clone the repository.
  2. Generate a Binance API key (with Futures access) and put it in credentials.py.
  3. Run pip3 install -r requirements.txt.
  4. Run python3 init_indicators_dict.py.
  5. Run python3 init_orders_dict.py.
  6. Run python3 main.py.

This will run an example bot on trading Bitcoin with 4 strategies simultaneously.

Config

To write custom bots you can:

  • Set an initial indicators setting in init_indicators_dict.py (because we are handling indicators in the client side with pickle files).
  • Set an initial orders setting in init_orders_dict.py (because we are handling orders in the client side with pickle files).
  • Define new indicators in indicators.py.
  • Define a new strategy in main.py (especially inside is_it_time_to_open_long_position and is_it_time_to_open_short_position functions).
  • Config your bot settings in config.py.

Note: If you define any machine learning model, you can use recent_prices_list as its input.

Warning: Binance has a maximum limit of 10 take-profit and stop-loss open orders, therefore do not use more than 5 strategies at the same time.

Telegram Config

  1. Firstly, you need to create a Telegram bot, so talk to @botfather.
  2. Secondly, need to know your own Telegram user ID, so the bot will know who to send messages to. Talk to @userinfobot to get this information.
  3. Thirdly, you have to /start your bot. Open up a private message with your bot by searching its username, then hit the start button.
  4. Finally, set TELEGRAM_API_KEY and TELEGRAM_USER_ID in credentials.py, and SEND_TELEGRAM_MESSAGE in config.py.

To-do

  • Import modules, not variables.
  • Use classes and make main.py smaller.
  • Add more indicators to indicators.py.
  • Find a better way for handling error codes.

See Also

  • Crypto Trading Strategy Backtester
  • Binance Spot Trading Bot
  • Finestel: Our automated trading bot can be used on Finestel & Finestel Pro: a crypto copy trading platform where pro traders & asset managers can connect their exchange accounts and manage their clients’ and communities of investors’ assets by using Finestel/Finestel Pro in conjunction with our Binance futures bot. Investors have the opportunity to profit the same as you while learning from more experienced traders.

Credits

Erfan Alimohammadi and Amir Reza Shahmiri

More Repositories

1

competitive-programming

Algorithm Design, Data Structures, ACM-ICPC, and IOI
C++
187
star
2

crypto-trading-strategy-backtester

Easy-to-use cryptocurrency trading strategy simulator and backtester
Python
73
star
3

map-coloring

Map coloring, using four colors
Python
52
star
4

Persian-OCR

Optical character recognition of Farsi and Arabic letters
Pascal
51
star
5

undervalued-crypto-finder

Get a list of cryptocurrencies which are now cheap and may be a good opportunity for investment
Python
45
star
6

thatcher-effect-dataset-generator

Apply Thatcher illusion on a set of face photos
Python
35
star
7

financial-dataset-generator

Financial Dataset Generator
Python
28
star
8

financial-indexes-correlation

Analyze financial data correlations
Python
24
star
9

fix-protocol

FIX 4.4 session layer implementation for a single pair of initiator (client) and acceptor (server) over TCP
C++
23
star
10

testsaz

Testsaz is a fast, minimal test-case generator system for ICPC style and IOI style problems.
C++
22
star
11

Tweeterify

A Twitter bot which recommends some Spotify top charts songs to people
Python
19
star
12

persian-digits-recognition

Identification of Farsi (Arabic) Scanned Handwritten Digits
Python
18
star
13

commit-type-detection

Classify Git commits with deep learning
Python
18
star
14

doggy-sweat-cheatsheet

Doggy Sweat ACM ICPC team notebook
C++
12
star
15

trump-vs-harris-us-election-prediction

Analyze Reddit comments using NLP to predict the potential winner of the US 2024 election
Python
10
star
16

fake-job-posting-prediction

Detect fake job posting with deep learning
Python
10
star
17

pascal-games

Some simple games, implemented with Pascal
Pascal
9
star
18

binance-spot-trading-bot

Easy-to-use Binance spot trading bot
Python
8
star
19

compilers-course-project

Converting a pseudo-C source code to a pseudo-assembly code
Python
8
star
20

starting-domjudge

A guide for starting DOMjudge using some helper Bash scripts
Shell
6
star
21

erfaniaa.github.io

HTML
5
star
22

Gardgir

Detect the part of code that can be used or not, but definitely is not required for the application.
Java
4
star
23

introduction-to-programming-course

Problems and solutions of introduction to programming course
C++
3
star
24

ai-course-project

Artificial Intelligence course final project
Python
3
star
25

signature-recognizer

Recognizing the owner of a handwritten signature
Pascal
3
star
26

AP-Messenger

A chatting messenger, implemented with JavaFx
Java
2
star
27

erfan-resume

My Resume
TeX
2
star
28

high-frequency-trading-garch

Retrieve data from Binance and simulate high-frequency trading on them using the GARCH model
Go
2
star
29

RPi-Alarm-Clock

Make an alarm clock with your Raspberry Pi, using a matrix keypad.
Python
2
star
30

doodle-bounce

A game similar to Doodle Jump
Pascal
1
star
31

p2p-file-sharing

Peer-to-peer network simulation
Python
1
star
32

map-merging

Merging two different geographic maps of the same city
Python
1
star
33

picture-puzzle

A simple picture puzzle game, implemented with Delphi
Pascal
1
star
34

ninjump-game

A game similar to Ninjump
C#
1
star
35

advanced-programming-course

Problems and solutions of advanced programming course
Java
1
star
36

30minar

A platform for internal usage of Allame Helli High School, used for managing tasks related to students and teachers. Implemented with PHP, HTML, CSS and SQL.
PHP
1
star
37

quran-inline-app

An inline app for Cafe Bazaar
Python
1
star