Telegram bot that uses the CoinMarketCap API and the Binance API to get information on cryptocurrencies and the global cryptocurrency market.
Talk to @coinmarketcap_info_bot on Telegram! https://t.me/coinmarketcap_info_bot
- Clone the repo to your computer and install the required dependencies.
git clone https://github.com/abhinavk99/crypto-bot.git cd crypto-bot npm install
- Get Binance API key and secret from your Binance user settings.
- Get a Telegram bot token from @BotFather.
- Make a file called
.envin the repo directory. - Copy/paste the below into the file.
TELEGRAM_TOKEN=Token here BINANCE_KEY=Key here BINANCE_SECRET=Secret here - Put your Telegram token and Binance API key and secret where it says to in the config. Do not put quotes around the tokens.
- Run the bot.
node bot.js
| Command | Description | Usage | Example |
|---|---|---|---|
| /info | Get info on coin with that name | /info <coin> |
/info Bitcoin |
| /info | Get info on coin with that CoinMarketCap rank | /info <number> |
/info 11 |
| /global | Get total market information | /global | /global |
| / | Get latest Binance ticker price for a coin | /<ticker> |
/ETH |
| /chart | Get chart on historical price for a coin | /chart <coin> |
/chart Bitcoin |
Releases start at v1.1.0 because I didn't know how to use git tags before then and manually changed the versions in package.json