Skip to content

This is a simple trading bot for the binance exchange.

Notifications You must be signed in to change notification settings

hbagheri/Simple-Binance-Trader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Binance Trader

Disclaimer

I am not responsible for the trades you make with the script, this script has not been exstensivly tested on live trades.

NOTE: The current strtergy is also very weak and will mostlikley return only losses therefore I recomend you create your work or use some which would work. However the trader currently also does not support simulated trades and only support live trading, simulated trades should be added in the future so you may need to wait until then to use this to test stratergies.

Description

This is a simple binance trader that uses the REST api and sockets to allow automation or manipulation of account detail/data. The script which in the default configuration uses a basic MACD trading setup to trade. The script however is very customisable and you'll be able to configure it as you with via the help of the document in the usage section.

Repository Contains:

  • run.py : This is used to start/setup the bot.
  • trader_configuration.py : Here is where you write your conditions using python logic.
  • settings.txt : This contains indicators that can be used by the bot.
  • Core
    • botCore.py : Is used to manage the socket and trader as well as pull data to be displayed.
    • handler.py : handles file reading/saving for cached data.
    • trader.py : The main trader inchage or updating and watching orders.
    • static : Folder for static files for the website (js/css).
    • templates : Folder for HTML page templates.

Setting File:

  • "publicKey" = Public API key.
  • "privateKey" = Private API key.
  • "runType" = Which mode to run teh trader (TEST/REAL) currently only real trades are configured, no simulation mode has been added yet
  • "mainInterval" = The Time interval for candles.
  • "traderCurrency" = The amount of btc allowed to share between every market.
  • "markets" = The market(s) you want to trade (currently only BTC markets are supported).
  • "host_ip" = Host IP can be set for the webserver to access the trader.
  • "host_port" = Host port can be set for the webserver to access the trader.

NOTE: If you wish to not host the web app locally you need to also edit the core/static/js/script.js ip address a the top of the file

Usage

I recommend setting this all up within a virtual python enviornment: First get the base modules:

  • To quickly install all the required modules use 'pip3 install -r requirements'.

Secondly get the required techinal indicators module adn binance api.

Move them into the site-packages folder. NOTE: If you get an error saying that either the technical_indicators or binance_api is not found you can move them in to the same directory as the run.py file for the trader.

Finally navigate to the trader directory.

To set up the bot and for any further detail please refer to the google doc link below: https://docs.google.com/document/d/1VUx_1O5kQQxk0HfqqA8WyQpk6EbbnXcezAdqXkOMklo/edit?usp=sharing

Contact

Please if you find any bugs or issues contact me so I can improve. EMAIL: [email protected]

About

This is a simple trading bot for the binance exchange.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.1%
  • JavaScript 9.5%
  • HTML 2.3%
  • CSS 2.1%