Code Monkey home page Code Monkey logo

binance-trader's Introduction

binance-trader

This is a trading bot that triggers buy and sell orders based on price and technical indicator triggers set by the user.

While the author(s) of this trading bot is using this application to automate trades, this application will not guarantee profits. Please use this application at your own risk.

Crypto Exchange

Currently only Binance is supported.

Installation

Core Requirements

  • NodeJS
  • TypeScript
  • npm

Production

This application is designed to run on heroku.

  • Set up environment variables on Heroku
  • audit - values allowed: "trace", "debug", "warn", "info"
  • key - the Binance API key
  • secret - the Binance API secret key
  • NODE_ENV - "heroku"
  • Then simply push to Heroku and it should automatically run npm install.

Development or running locally

Instead of environment variables, the values are defined in src/config/secret.json. Simply replace the values to your own. To build, run: npm run build

Testing

No tests at the moment. (Yes, very bad. You are warned!)

Organisation

  • app.ts - entry point of application
  • binance.ts - provides exchange data and functionality
  • trader.ts - takes care of the act of trading by taking data from exchange and applying calculations to make trade decisions
  • symbol.ts - data structure to hold state and config of traded symbol
  • config/default.json - user settings for running the bot
  • configurator.ts - prepares the config for each symbol based on user settings

Configuration

Buying Strategies

  • single ema and price spread
  • ema slow and fast spread
  • macd
  • rsi
  • bollinger bands
  • dca

Selling Strategy

  • percentage gain

Dollar Cost Averaging (DCA)

When in selling mode, and the price is falling, the bot can be set to buy more coins at each DCA percentage level to lower the overall costs. If user buys more coins manually, an event will be triggered to update the coin quantity and cost, and the next DCA price level will be calculated at the new cost.

Warning

Bot will sell everything in your bag that are not locked in any open orders.

binance-trader's People

Contributors

jakesee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

binance-trader's Issues

multiple pair

hello, can i know this project can do auto track all BTC pair on binance and auto order multiple uptrend(using TA strategy or DCA)coin and auto sell it when hit profit % or stoploss? and can add blacklist/whitelist for coin .. if this project can do these work 24/7 without any problem , i will donate you some BTC for this project , Thanks You!

Fix newly bought coin causes runtime error and process termination

When symbol does not exists or bag is not initialised properly during startup, newly bought coins will trigger null exception in user event handler.

TODO:

  1. Ensure all bags are initialised properly
  2. Use exchange info to determine bag quantity
  3. Handle coins specified in the config file and coins not specified in the config file

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.