Skip to content

ErfannKhastar/Bitcoin-Price-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyQt6 Bitcoin Price Tracker ₿

A sleek, real-time desktop application that fetches and displays the live price of Bitcoin using the CoinMarketCap API. The application features a clean interface built with Python and PyQt6, showing the current price in both US Dollars (USD) and an estimated Iranian Rial (IRR) equivalent, along with key performance metrics.

App Screenshot


🚀 Features

Feature Description
💸 Live USD Price Displays the most up-to-date price of Bitcoin in US Dollars.
🇮🇷 IRR Conversion Automatically calculates the USD price to Iranian Rial (IRR) based on a predefined rate.
📊 Performance Metrics Tracks and displays percentage price changes over the last 24 hours, 7 days, and 30 days.
🔄 Manual Refresh Includes a dedicated "Update!" button to fetch the latest data from the API on demand.
🕒 Timestamp Shows the exact time of the last successful data fetch so you know how current the info is.
🔐 Secure API Handling Manages the secret CoinMarketCap API key securely using a .env file.

🛠️ Technologies Used

  • Python 3: Application logic.
  • PyQt6: Graphical User Interface (GUI).
  • Requests: For making HTTP calls to the CoinMarketCap API.
  • Python-dotenv: For securely loading environment variables and credentials.

📦 Requirements & Installation

To run this application, you need Python 3.x and a free CoinMarketCap API Key.

  1. Clone the Repository:

    git clone <your-repository-url>
    cd <repository-folder>
  2. Get a CoinMarketCap API Key:

  3. Set Up Your Environment File: In the root directory of the project, create a file named .env and add your key:

    API_KEY=your_api_key_here
  4. Install Dependencies: It is highly recommended to use a virtual environment (.venv).

    pip install -r requirements.txt

    (Ensure btc.png is located inside the src folder).

  5. Run the Application: Execute the main script from the src directory:

    python src/main.py

⚙️ How It Works

  1. Upon launch or when the Update! button is clicked, the update_price function runs.
  2. It constructs a secure request to the CoinMarketCap API using the key loaded from the .env file.
  3. Once a successful JSON response is received, the app parses the Bitcoin price (USD) and its percentage changes.
  4. It calculates the IRR equivalent and updates all the corresponding GUI labels to display the fresh data.

🤝 Support & Feedback

If you found this project helpful or interesting, please consider giving it a Star ⭐️ on GitHub! Feel free to open an issue or leave a comment if you have any suggestions, feedback, or found a bug. Your input helps make this project better.

📬 Contact Me

Let's connect! You can find my links and reach out to me through my GitHub profile bio:

  • Check out my GitHub Profile for Email, Telegram, LinkedIn, and Instagram links.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A real-time Bitcoin price tracking desktop application built with Python, PyQt6, and the CoinMarketCap API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages