Code Monkey home page Code Monkey logo

simple-binance-trader's Introduction

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.

Please check the following:

  • Make sure your account uses BNB for the trade fees and that you have plenty of BNB for the trader to use for trades as if not there will be issues with the trader.
  • Please clear any cache files when updating the trader as there may be issues if not.
  • Please if any updates are also available for binance_api or the technical indicators update those also.

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.

NOTE: Trader now supports MARGIN trades allowing the placement of short and long positions. If SPOT trading put your conditions within the "long_entry/long_exit" sections within the trader_configuration.py file.

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.
  • patterns.py : Can be used to trade based on specific patterns.
  • Core
    • botCore.py : Is used to manage the socket and trader as well as pull data to be displayed.
    • 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:

  • PUBLIC_KEY - Your public binanace api key
  • PRIVATE_KEY - Your private binanace api key
  • IS_TEST - Allow trader to be run in test mode (True/False)
  • MARKET_TYPE - Market type to be traded (SPOT/MARGIN)
  • UPDATE_BNB_BALANCE - Automatically update the BNB balance when low (for trading fees, only applicable to real trading)
  • TRADER_INTERVAL - Interval used for the trader (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d).
  • TRADING_CURRENCY - The currency max the trader will use (in the quote key) also note this scales up with the number of markets i.e. 2 pairs each market will have 0.0015 as their trading currency pair.
  • TRADING_MARKETS - The markets that are being traded and seperate with ',' (BTC-ETH,BTC-NEO)
  • HOST_IP - The host IP for the web UI (if left blank default is 127.0.0.1)
  • HOST_PORT - The host port for the web UI (if left blank default is 5000)
  • MAX_CANDLES - Max candles the trader will use (if left brank default is 500)
  • MAX_DEPTH - Max market depth the trader will use (if left brank default is 50)

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]

simple-binance-trader's People

Contributors

easyai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.