CkCreative / binance-spot-trading-bot

This is a simple binance spot trading bot made using Node.js. Read the documentation to get the background of the claims behind the bot.
Other
85 stars 34 forks source link

Binance Trading App (Bot)

Sample UI

This is a Node.js binance trading bot that takes advantage of crypto's volatile prices.

NB: You will need a Binance account. Register Here

Get Support

Join Discord channel to ask questions, or create an issue.

Discord Invite: Join

Caution

⚠️ This is still alpha stuff under active development. Some things might not work as described yet. Also, a lot of changes happening all over the place.

Future Improvements

Running the Bot

Just edit the settings.json file to include your own preferences and your preferred market, your preferred market should have money, then docker-compose up or docker-compose up -d depending on your kind of medicine.

To run without Docker, edit the settings.json file accordingly and then run npm install inside the /bot folder then npm run dev.

Add your suitable settings:

{
    "URL": "https://api.binance.com/api/v3",
    "API_SECRET": "YOUR BINANCE API SECRET", // STRING
    "API_KEY": "YOUR BINANCE API KEY", // STRING
    "WIGGLE_ROOM": 0.5, // FLOAT - THE PERCENTAGE MARGIN YOU ARE WILLING TO PLAY WITH
    "MAIN_MARKET": "BTCUSDT", // STRING - THE MARKET, E.G. BTCUSDT
    "CANCEL_AFTER": 300, // After how long in seconds should you cancel an order?
    "INSTANCE_NAME": "BTC", // If you are using the same Discord server to receive notifications from multiple instances, this makes it easy to know which instance is sending you a notification.
    "INTERVAL": 3000, // How long before loop repeats in milliseconds
    "ACCEPTABLE_LOSS": 2, // this is not yet used in the logic
    "HIGHEST_RSI": 70, // INTEGER - HIGHEST RSI VALUE YOU WANT TO AVOID BUY
    "DISCORD": "DISCORD_WEBHOOK_URL", // WHERE TO SEND BUY/SELL NOTIFICATIONS
    "DISCORD_ERRORS": "DISCORD_WEBHOOK_URL_FOR_ERRORS", // WHERE TO SEND ERRORS
    "ASSET_PERCENT": 99, // the percentage of main asset to sell. Max value = 99
    "FIAT_OR_QUOTE_PERCENT": 99, // percentage of the bridge/fiat/quote coin to use when buying. Max value = 99
    "TELEGRAM_TOKEN": "", // TELEGRAM TOKEN
    "TELEGRAM_CHATID": "", // TELEGRAM CHATID
    "BUYING_PRICE_DIVIDER": 1, // This default value means the buying price is the current price minus the wiggle room. If you want to buy a little closer to the current price, increase this value. 
    "PIN": 12345, // This is used in the UI. When you change this, you need to restart the bot.
    "PORT": "3000", // This is the default port of the frontend server.
    "STATE": "ON" // "ON" or "OFF". This is useful if you are using a remote server and you want that when you have stopped from the frontend, the bot does not auto resume trading when server restarts.
}

:warning: CAUTION for BUYING_PRICE_DIVIDER:warning:: YOU WILL ENCOUNTER ISSUES IF YOU SET A VALUE LESS THAN 1.

Detailed Installation Instructions

You can run this bot anywhere. This includes on PC, Mac or Linux provided you have node.js (v14) installed if you want to run without Docker.

Running without docker

Known Issues

When you configure the bot to a new market, sometimes it fails to pick up buyin or selling. In this case, simply place an order that won't be filled instantly, for example, a very low buy order or a very high sell order, then, start up the bot and cancel the order thereafter. The bot should pick up from there.

Contributors

Owners


Mike CK

Creator

Feature contributors


Lownoise

Telegram Integration and more

License

MIT