A powerful cryptocurrency price tracking bot that supports both Telegram and WhatsApp. Get real-time cryptocurrency prices, market overviews, and beautiful screenshots of price charts.
- Multi-Platform Support: Works on both Telegram and WhatsApp
- Real-time Price Tracking: Get current prices for any cryptocurrency
- Market Overview: View top cryptocurrencies and market metrics
- Visual Feedback: Beautiful screenshots of price charts and market data
- Error Handling: Robust error handling and logging
- Queue System: Handles multiple requests efficiently
/price <symbol>
: Get current price for a cryptocurrency (e.g.,/price BTC
)/market
or/top
: View market overview/help
: Show available commands
- Node.js v16 or higher
- npm or yarn
- A Telegram Bot Token (get from @BotFather)
- A CoinMarketCap API Key (get from CoinMarketCap)
- Chrome/Chromium (for screenshots)
-
Clone the repository
git clone https://github.com/iblessdeno/Crypto-price-snap-Bot.git cd Crypto-price-snap-Bot
-
Install dependencies
npm install
-
Create environment file Create a
.env
file in the root directory with:TELEGRAM_BOT_TOKEN=your_telegram_bot_token COINMARKETCAP_API_KEY=your_coinmarketcap_api_key
-
Run the setup script
setup.bat
-
Scan WhatsApp QR Code When prompted, scan the QR code with WhatsApp to authenticate the bot.
-
Connect to your VPS
ssh username@your_vps_ip
-
Run the auto-setup script
wget -O - https://raw.githubusercontent.com/iblessdeno/Crypto-price-snap-Bot/main/setup.sh | bash
Or manually:
# Update system sudo apt update && sudo apt upgrade -y # Install Node.js curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt-get install -y nodejs # Install Chrome dependencies sudo apt-get install -y chromium-browser # Install PM2 sudo npm install -y pm2 -g # Clone repository git clone https://github.com/iblessdeno/Crypto-price-snap-Bot.git cd Crypto-price-snap-Bot # Install dependencies npm install # Set up environment variables cp .env.example .env # Edit .env with your tokens nano .env # Start the services pm2 start ecosystem.config.cjs pm2 save
-
Monitor your bots
# View all processes pm2 status # View logs pm2 logs
crypto-price-bot/
├── js/ # Frontend React components
├── logs/ # Bot logs
├── screenshots/ # Temporary screenshots
├── ecosystem.config.cjs # PM2 configuration
├── telegram-bot.js # Telegram bot implementation
├── whatsapp-bot.js # WhatsApp bot implementation
├── server.js # Frontend server
└── setup.sh # VPS setup script
TELEGRAM_BOT_TOKEN
: Your Telegram bot tokenCOINMARKETCAP_API_KEY
: Your CoinMarketCap API key
# On your VPS
./deploy.sh
# All logs
pm2 logs
# Specific bot logs
pm2 logs telegram-bot
pm2 logs whatsapp-bot
-
WhatsApp Authentication Issues
- Delete
.wwebjs_auth
directory - Restart the bot and scan QR code again
- Delete
-
Screenshot Issues
- Check Chrome/Chromium installation
- Verify frontend server is running
- Check logs for specific errors
-
API Issues
- Verify API keys in
.env
- Check API rate limits
- Review error logs
- Verify API keys in
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.