/cryptocurrency-trading-bot

Example of a simple indicator using trading bot on Node.js with WebSockets

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Cryptocurrency trading bot

Example of a simple trading bot on nodejs with WebSockets. Exchange Binance. Indicators used (add more if necessary).

  • Bollinger Bands (BBands)
  • Relative Strength Index (RSI)
  • Simple Moving Avarage (SMA)

Bot will open a position with indicators and close with profit +1% (can change in config).

Denial of responsibility

Bot was created for learning. It's not ready for production. Use at your own risk.

Init

Indicator's lib tulind. Full list of indicatores with options https://tulipindicators.org/list.

Install

Required installed Node.js

$ npm i
$ yarn

If you have questions during installation, read tulind docs (need for Windows OS).

Run

$ node src/main.js
$ npm run dev  // for development

Set up ur options.

const config = {
    symbol: 'btcusdt',
    interval: '30m', 
    deposit: 10, // 10%, 1/10 from depo
    profit: 1, // 1%
    indicators: [
        {
            symbol: 'bbands',
            options: [5, 3], // period, stddev
        },
        {
            symbol: 'rsi',
            options: [14], // period
        }
    ]
}

const auth = {
    key: '<YOUR-KEY>',
    secret: '<YOUR-SECRET>'
}

module.exports = {
    config,
    auth
}

TODO

  • Trading bot
  • Open positions with a ladder orders
  • Backtesting

Stay in touch

Feel free to ask questions 😊