Crypto Price Tracker is a comprehensive tool designed to monitor cryptocurrency prices in real-time, provide alerts for significant price movements, and deliver daily summaries of market activity. This project utilizes the Binance WebSocket API to stream live price data and offers customizable alerts and notifications.
- Real-time price tracking for multiple cryptocurrencies
- Customizable price alerts for all-time highs, all-time lows, and specific thresholds
- Email notifications for triggered alerts and daily price digests
- User-friendly GUI for easy configuration
- Robust error handling and automatic reconnection for WebSocket streams
-
Clone the repository:
git clone https://github.com/cortega26/crypto-price-tracker.git cd crypto-price-tracker
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the configuration GUI:
python run.py
-
Fill in the required fields:
- Binance API Key and Secret
- Email settings for notifications
- Symbols of interest
- Notification thresholds and intervals
-
Save the configuration. The settings will be stored in a
.env
file.
After configuring the application, you can start the Crypto Price Tracker by running:
python run.py
This will:
- Load the configuration
- Initialize the price tracker and alert system
- Connect to the Binance WebSocket stream
- Begin monitoring prices and sending alerts as configured
- config.py: Manages application configuration using Pydantic for robust validation.
- api_client.py: Handles communication with the Binance API.
- price_tracker.py: Tracks and analyzes price movements.
- alert_manager.py: Manages alert conditions and triggers notifications.
- notification.py: Handles sending email notifications.
- websocket_handler.py: Manages the WebSocket connection for real-time data.
- gui.py: Provides a user-friendly interface for configuration.
- main.py: Orchestrates the entire application.
- Graceful Shutdown: The application handles SIGINT and SIGTERM signals for graceful shutdown, ensuring all resources are properly cleaned up.
- Automatic Reconnection: In case of WebSocket disconnection, the application will automatically attempt to reconnect with exponential backoff.
- Efficient Data Storage: Historical price data is stored efficiently to balance between memory usage and performance.
You can customize various aspects of the tracker by modifying the configuration through the GUI or by directly editing the .env
file. Advanced users can also modify the source code to add new features or alter existing functionality.
If you encounter any issues:
- Check the log files for error messages.
- Ensure your Binance API key has the necessary permissions.
- Verify your email settings if you're not receiving notifications.
- For WebSocket connection issues, check your internet connection and Binance API status.
Contributions to the Crypto Price Tracker are welcome! Please feel free to submit pull requests, create issues or suggest new features.
This project is licensed under the Apache License - see the LICENSE file for details.
If you find this project helpful and want to support its development, consider buying me a coffee! Your support helps maintain and improve the Crypto Price Tracker.
- Star this repository
- Share the project with others
- Contribute to the codebase
- Report bugs or suggest new features
Your support, in any form, is greatly appreciated! Thank you for helping make this project better.
This tool is for educational and informational purposes only. Cryptocurrency trading involves significant risk. Always do your own research before making any trading decisions.