Skip to content

gkocoding/python-scraper-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Crypto Price Tracker with Telegram Alerts

Automated Bitcoin & Ethereum price monitor that sends instant Telegram alerts on significant market moves.


🚀 Overview

This bot runs in the background, checking live crypto prices every hour via the CoinGecko API. If Bitcoin or Ethereum moves more than 10% since the last check, you get an instant Telegram notification — no manual monitoring needed.


⚙️ How It Works

  1. Fetches live BTC & ETH prices in EUR from CoinGecko
  2. Compares them to the last saved prices (previous_prices.json)
  3. If change > 10% → sends a Telegram alert
  4. Saves current prices for the next comparison
  5. Repeats every hour automatically

🛠️ Tech Stack

Tool Purpose
Python 3 Core language
requests API calls
schedule Automated scheduling
python-dotenv Secure credential management
CoinGecko API Live crypto prices (no API key needed)
Telegram Bot API Price change notifications

📦 Installation

  1. Clone the repository
   git clone https://github.com/gkocoding/python-scraper-scheduler.git
   cd python-scraper-scheduler
  1. Create and activate virtual environment
   python -m venv venv
   .\venv\Scripts\Activate.ps1
  1. Install dependencies
   pip install -r requirements.txt
  1. Create .env file in the root folder TELEGRAM_TOKEN=your_telegram_bot_token

TELEGRAM_CHAT_ID=your_chat_id

  1. Run the tracker
   python tracker.py

🔑 Getting Telegram Credentials

Bot Token:

  • Open Telegram and search for @BotFather
  • Send /newbot and follow the instructions
  • Copy the token you receive

Chat ID:

  • Start your bot and send it any message
  • Visit: https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
  • Find "chat": {"id": ...} in the response

📁 Project Structure

python-scraper-scheduler/

├── tracker.py # Main script

├── previous_prices.json # Auto-generated, stores last known prices

├── requirements.txt # Dependencies

├── .env # Secret credentials (not tracked by git)

└── README.md


💡 Example Alert

Bitcoin price changed by 12.45%!


Built as a portfolio project — part of a Python freelance development journey.

About

Python scraper scheduler

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages