psadaic / CryptoBot

This is an experimental terminal bot for auto trading on binance.com exchange

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CryptoBot

NodeJS trading bot for Binance

This is an experimental terminal bot for auto trading on binance.com exchange.

Due to Binance suspending US customers from their site, I have postponed development until further details are released about Binance US.

Configuration

  1. Signup for Binance

  2. Enable Two-factor Authentication

  3. Go to API Center, Create New Api Key

    [✓] Read Info [✓] Enable Trading [] Enable Withdrawals
    
  4. Create a .env file and insert your API and Secret Keys

    cp .env.tmpl .env

    API_KEY=...
    
    API_SECRET=...
    
  5. If holding BNB, turn on using BNB for trade fees in your account to save 25%. Option to hold BNB along with the min balance can be set in the constants.js file. More about trade fees and tiers can be found here.

  6. Optional: alter additional bot presets such as portfolio allocation or trade intervals in constants.js

  7. Make sure to turn off your computers energy saving settings so that your terminal process won't pause if your computer goes to sleep. Alternatively, you can prepend caffeinate to your start command.


Dependencies

binance-api-node

chart_utils

Usage

yarn start:dev - (starts the development server for testing. No real orders will be sent.)

yarn start - (creates a build and runs the production server. Warning: orders are now live.)

Run in a Docker container

Install Docker

# Build the image
$ docker build -t bot-img .

# Run the image
$ docker run -d -ti --name crypto-bot bot-img

# Print bots output logs
$ docker logs crypto-bot

# If you want to enter the container
$ docker attach crypto-bot

# If you want to stop the container
$ docker stop crypto-bot

# If you want to clean unused containers/images
$ docker system prune

DISCLAIMER

Use this bot at your own risk. I am not responsible for any potential losses.
There are no warranties or guarantees expressed or implied.
You assume all responsibility and liability.

Contributing

Fork this Repo
Commit and push your changes
Create a new Pull Request

Roadmap

  • Configure Binance API routes
  • Set main structure with balance, budget, and allocation functionality
  • Handle logic for buy and sell orders
  • Calculate MACD values
  • Calculate RSI values
  • Setup cron task
  • Add environment variables for dev and production
  • Handle BNB min holdings
  • Allow custom trade or stable pairs
  • Release V1
  • Set-up Docker
  • Clean-up log outputs with tables and ora spinners
  • Integrate websockets and batch orders
  • Handle upcoming margin additions to Binance
  • Add configurations for other technical indicators
  • Release V2
  • Get sentiment analysis from Twitter or StockTwits
  • Integrate coindar calendar for upcoming news
  • Develop algo for selecting top 5 altcoins
  • Release V3

Donate

BTC: 18j1UsoK98sdkHtJg1aaRw1ZsdEDfGRCRh

LTC: LXRhTEmydq7M8cw3W9stD2xH4f167USWHJ

ETH: 0xfa00fb818a26bf8eda9726d80d6d8d6fbf4d97bd


License

Code released under the MIT License.


About

This is an experimental terminal bot for auto trading on binance.com exchange


Languages

Language:JavaScript 98.1%Language:Dockerfile 1.9%