This source code evolved into a full desktop trading application, to be launched in Q1 2022. 🚀
For more information, follow me on Twitter.
A big thank you to everyone who dedicated their time to help it grow.
BitProphet is a node crypto trading platform for Binance exchange that uses chat bots as its interface. Its main purpose is the automation of trading techniques, but it can also be used as a simple order notification tracker or as an alert system for the most used technical indicators. Suggestions and pull requests are very welcome!
npm install bitprophet --save
First, you'll need to create a bot for Telegram. Just talk to BotFather and follow simple steps until it gives you a token for it. You'll also need to create a Telegram group, the place where you and BitProphet will communicate. After creating it, add the bot as administrator (make sure to uncheck "All Members Are Admins").
Create a server and follow these simple steps until you have a token and added the bot to the server you've just created.
In order to find out the chat id where your bot was added to, run node with the following code and then just say something in the group/server. The bot will reply with the chat id.
const bitprophet = require('bitprophet')
bitprophet.options({
telegram: {
token: "YOUR_TELEGRAM_BOT_TOKEN"
},
discord: {
token: "YOUR_DISCORD_BOT_TOKEN"
}
})
bitprophet.listenToChatId()
This is the code to start BitProphet. If the only thing you need is to be notified of trades, you're done.
const bitprophet = require('bitprophet')
bitprophet.options({
binance: {
key: "YOUR_BINANCE_API_KEY",
secret: "YOUR_BINANCE_API_SECRET"
},
telegram: {
chatId: "YOUR_TELEGRAM_GROUP_ID",
token: "YOUR_TELEGRAM_BOT_TOKEN"
},
discord: {
chatId: "YOUR_DISCORD_CHANNEL_ID",
token: "YOUR_DISCORD_BOT_TOKEN"
}
})
bitprophet.start()
You should now see a message in Telegram/Discord telling you BitProphet has started.
In Telegram/Discord type list and you'll see all the available strategies listed with the respective ids. If a strategy listed has the [PT] prefix, it means it has Paper Trading active. To start a strategy, just type __start strategy_id. For example, start buydip__.
Add the following option naming a new directory for your strategies.
bitprophet.options({
strategiesDir: "./path/my/strategies"
})
Create index.js inside that folder with the configuration for all your strategies
module.exports = {
strategies: {
alertsbb: {
name: "Alerts Bollinger Bands",
targetMarket: "BTC"
},
quickdip: {
name: "Quick Dip",
//buyAmountMarket: 0.012,
buyPercentageAccount: 0.01,
profitTarget: 1.4,
maxLoss: 0.8,
maxTradingPairs: 4,
targetMarket: "BTC"
},
ichitest: {
name: "Ichimoku Test",
paperTrading: true,
buyAmountMarket: 0.012,
profitTarget: 1.4,
maxTradingPairs: 8,
targetMarket: "BTC",
excludeTokens: ["NEO", "TRX"]
},
//...
}
}
Create your strategies based on the examples.
Add the following option naming a new directory for your commands.
bitprophet.options({
commandsCustomDir: "./path/my/commands"
})
Create index.js inside that folder with the configuration for all your commands
module.exports = {
commands: {
test: {
triggers: ["test", "t"]
description: "Just a test command"
},
//...
}
}
Create in the same directory test.js and code it based on the examples.
Thank you to all contributors: supershwa, ionutgalita