Skip to content

closeandclose/ethTaoBot

Repository files navigation

Crypto Price Monitor 📊

Real-time ETH and TAO price monitoring with Telegram bot integration!

🚀 Quick Start

Option 1: Console Logger (Simple)

npm install
npm start

Displays prices in your terminal every 10 seconds.

Option 2: Telegram Bot (Recommended) 🤖

npm install
npm run telegram

Setup Required (5 minutes):

  1. Read TELEGRAM-SETUP.md for detailed instructions
  2. Edit config.js with your bot token and chat ID
  3. Run npm run telegram
  4. Send /start_updates to your bot on Telegram

📋 Features

✅ Real-time price fetching from Binance API
✅ ETH and TAO price monitoring
✅ ETH/TAO exchange rate calculation
✅ Console logger for terminal output
✅ Telegram bot for mobile notifications
✅ Interactive bot commands
✅ Updates every 2 seconds, displays every 10 seconds

📁 Files

  • simple-price-logger.js - Console logger
  • telegram-price-bot.js - Telegram bot
  • config.js - Bot configuration (edit this!)
  • TELEGRAM-SETUP.md - Telegram bot setup guide
  • package.json - Dependencies

💬 Telegram Bot Commands

  • /start - Welcome message
  • /price - Get current prices (one-time)
  • /start_updates - Start automatic updates every 10s
  • /stop_updates - Stop automatic updates
  • /help - Show help

📊 Example Output

Console:

[10:30:45]
  ETH Price:    $3432.44
  TAO Price:    $361.68
  ETH/TAO Rate: 9.4923 (1 ETH = 9.4923 TAO)

Telegram:

🔔 Crypto Price Update

⏰ 11/12/2025, 10:30:45 AM

💎 Ethereum (ETH)
Price: $3432.44

🔷 Bittensor (TAO)  
Price: $361.68

📊 Exchange Rates
1 ETH = 9.4923 TAO
1 TAO = 0.1053 ETH

🛠️ Installation

npm install

🎯 Usage

# Console logger
npm start

# Telegram bot
npm run telegram

📖 Documentation

  • See TELEGRAM-SETUP.md for Telegram bot setup
  • Edit config.js for bot configuration

🔧 Configuration

Edit config.js:

module.exports = {
  TELEGRAM_BOT_TOKEN: 'your_token',
  TELEGRAM_CHAT_ID: 'your_chat_id',
  FETCH_INTERVAL: 2000,  // How often to fetch (ms)
  UPDATE_INTERVAL: 10000 // How often to display (ms)
};

📱 Get Started with Telegram

  1. Search for @BotFather on Telegram
  2. Create a new bot
  3. Get your chat ID from @userinfobot
  4. Edit config.js
  5. Run npm run telegram

Full instructions in TELEGRAM-SETUP.md

🌟 Why Telegram Bot?

  • 📱 Receive updates on your phone
  • 🔔 Get notifications anywhere
  • 💬 Interactive commands
  • 🚀 Start/stop updates on demand
  • 📊 Beautiful formatted messages

Happy monitoring! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published