crypto-bot
is an open-source bot that track some popular crypto tokens/coins (BTC, BCH, ETH, ADA, LINK, SOL, DOT, MATIC, ALGO, AVAX and VET). The bot gives you a notification when the trend is changing (up/down trend).
This bot will is already running live in the following Telegram channel, whenever there is an up- or downtrend you automatically get notified of each of the previously mentioned crypto coins. Technical analysis is applied to determine the up- or downtrends (based on MACD crosses of PPO indicator).
You can join the public Crypto Exchange Alert Telegram channel, where this bot is present. And keeps you up-to-date!
Or since this project is open-source, you can setup your own crypto-bot
as well as your own Telegram Bot. See below.
This bot is written in JavaScript and run on NodeJS.
Use the DockerHub Docker image (see also: Dockerfile).
-
Copy/rename the config template file to
config.yml
, can be stored anywhere on your machine:cp configTemplate.yml config.yml
-
Now change the
config.yml
to your needs (see "Most important Settings" section below). -
Start Docker container by providing the
config.yml
from outside the Docker container (by default using current working directory,pwd
, on your host machine):docker run --restart always -p 127.0.0.1:3010:3010 -v $(pwd)/config.yml:/app/config.yml -d danger89/crypto-bot
Note: The command above should pull the image automatically from Docker Hub.
You can also use docker-compose
, see docker-compose.yml.
Follow the steps:
- Copy the config template to
config.yml
:cp configTemplate.yml config.yml
- Change the configuration settings, webhook domain for Telegram bot and API keys for the stock data
- Install depedencies via:
npm install
(once needed) - Start the bot using:
npm start
During development you could use: npm run start-fake
. Which will start the app, but not connect to the TwelveData API.
Advice: Run the bot 24/7 on some dedicated hardware. cron_time
within the configuration will take care of the triggers when to look-up for data.
Hidden feature: Set DEBUG
to true
value in the dataProcessor.js source file to dump the market data to a comma-seperated values (CSV) file. Useful for off-line verification/calculations.
The following settings require definitely some attention during setup:
exchange_settings -> use_cache
- Set toFalse
to not use any local caching, needed for production!exchange_settings -> api_token
- API token of twelvedata - Create a free API token on their websitetelegram_settings -> bot_token
- Token from Telegram, created via @BotFathertelegram_settings -> public_url
- Telegram public URL for Webhooktelegram_settings -> chat_id
- Telegram channel name including '@' or any other chat ID.
There are also 2 environment variables available to set:
HOST
(default:0.0.0.0
)PORT
(default:3010
)