Skip to content

NgoHuuLoc0612/Currency-Converter

Repository files navigation

Professional Currency Converter

A comprehensive, feature-rich currency converter application with real-time exchange rates, advanced charting, portfolio management, and automated alerts.

Features

πŸ”„ Real-Time Currency Conversion

  • Support for 150+ currencies worldwide
  • Multiple API sources for maximum reliability
  • Cached data for offline functionality
  • Automatic fallback between API providers

πŸ“Š Advanced Charting

  • Real-time exchange rate charts
  • Multiple chart types: Line, Candlestick, Volume, Comparison
  • Configurable time periods (15 minutes to 1 week)
  • Auto-refreshing charts with customizable intervals
  • Professional styling with trend indicators

πŸ“ˆ Portfolio Management

  • Track multiple currency portfolios
  • Transaction history and performance analytics
  • Portfolio rebalancing suggestions
  • Target allocation management
  • Performance metrics (ROI, Sharpe ratio, volatility)

πŸ”” Smart Alerts & Notifications

  • Price threshold alerts (above/below)
  • Percentage change alerts
  • Desktop notifications
  • Sound alerts
  • Email notifications (configurable)
  • Watchlist management

πŸ’Ύ Data Management

  • SQLite database for persistent storage
  • Export data to CSV/JSON/Excel formats
  • Automatic data backup
  • Historical data retention
  • Import/export functionality

βš™οΈ Professional Features

  • Multi-threading for responsive UI
  • Configurable settings and preferences
  • Comprehensive error handling
  • Logging and debugging support
  • Rate limiting and API management

Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Quick Setup

  1. Clone or download the project files

  2. Install required packages

    pip install -r requirements.txt
  3. API Keys Setup (Optional but Recommended)

    For enhanced functionality, obtain free API keys from:

    Set environment variables:

    # Windows
    set FIXER_API_KEY=your_fixer_key_here
    set CURRENCYLAYER_API_KEY=your_currencylayer_key_here
    set ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key_here
    
    # Linux/Mac
    export FIXER_API_KEY=your_fixer_key_here
    export CURRENCYLAYER_API_KEY=your_currencylayer_key_here
    export ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key_here

    Or edit the config.py file directly.

  4. Run the application

    python main.py

File Structure

Currency Converter/
β”œβ”€β”€ main.py                 # Main application entry point
β”œβ”€β”€ api_manager.py          # API integration and rate fetching
β”œβ”€β”€ chart_generator.py      # Chart creation and visualization
β”œβ”€β”€ data_storage.py         # Database operations and data persistence
β”œβ”€β”€ config.py              # Configuration settings
β”œβ”€β”€ notification_manager.py # Alerts and notifications
β”œβ”€β”€ portfolio_manager.py    # Portfolio and transaction management
β”œβ”€β”€ requirements.txt        # Python dependencies
└── README.md              # This file

Usage Guide

Basic Currency Conversion

  1. Launch the application
  2. Select source currency from the "From" dropdown
  3. Select target currency from the "To" dropdown
  4. Enter the amount to convert
  5. Click "Convert" to get real-time exchange rate

Creating Charts

  1. Select currency pair in the chart section
  2. Choose chart type (Line, Candlestick, Volume, Comparison)
  3. Select time period (15 minutes to 1 week)
  4. Click "Update Chart" or enable auto-refresh

Portfolio Management

  1. Create a new portfolio from the portfolio menu
  2. Add transactions (buy/sell/exchange)
  3. Set target allocations for rebalancing
  4. Monitor performance with built-in analytics

Setting Up Alerts

  1. Add currency pairs to your watchlist
  2. Set price thresholds or percentage changes
  3. Configure notification preferences
  4. Receive alerts via desktop notifications or sound

Data Export

  1. Use the export functionality to save:
    • Exchange rate history
    • Portfolio data
    • Transaction records
    • Alert history

Configuration

API Settings

Edit config.py to customize:

  • API keys and endpoints
  • Rate limiting parameters
  • Fallback API priorities
  • Cache expiration times

UI Customization

  • Chart colors and styling
  • Update intervals
  • Window size and layout
  • Font preferences

Database Settings

  • Data retention periods
  • Backup frequency
  • Storage locations
  • Cleanup schedules

Advanced Features

Multiple API Integration

The application intelligently manages multiple exchange rate APIs:

  • ExchangeRate-API: Free, no key required (primary)
  • Fixer.io: Reliable, 100 free requests/month
  • CurrencyLayer: Comprehensive, 1000 free requests/month
  • Alpha Vantage: Historical data, 500 requests/day

Real-Time Updates

  • Configurable refresh intervals (default: 30 seconds)
  • Automatic chart updates
  • Background data fetching
  • Smart caching to minimize API usage

Professional Charting

  • Moving averages and technical indicators
  • OHLC candlestick charts with volume
  • Interactive zoom and pan
  • Export charts as PNG/PDF

Performance Analytics

  • Portfolio ROI calculations
  • Risk metrics (volatility, Sharpe ratio)
  • Drawdown analysis
  • Currency correlation analysis

Version History

v1.0.0

  • Initial release with core functionality
  • Real-time currency conversion
  • Basic charting capabilities
  • Portfolio management
  • Alert system
  • Data export/import

Note: This application is for educational and personal use. Exchange rates are provided by third-party APIs and may not reflect real-time market conditions. Always verify rates with official financial sources for actual trading decisions.

About

A simple currency converter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages