A simple Telegram bot that provides current cryptocurrency prices using the CCXT library.
- Fetch current cryptocurrency prices from Binance
- Respond to
/price
command with the requested cryptocurrency symbol
- Clone this repository or download the source code.
- Install the required dependencies:
npm install node-telegram-bot-api ccxt
- Set your Telegram API token, Binance API key, and Binance API secret in the
index.js
file:
const TELEGRAM_API_TOKEN = 'YOUR_TELEGRAM_API_TOKEN';
const API_KEY = 'YOUR_API_KEY';
const API_SECRET = 'YOUR_API_SECRET';
- Run the bot:
node index.js
To use the bot, simply send a message with the /price
command followed by the cryptocurrency symbol (e.g., /price BTC/USDT
).
Example:
/price BTC
The bot will automatically append /USDT
if a trading pair is not provided.
This project is licensed under the MIT License. See the LICENSE file for details.