Index Page
1. Certificate
2. CO Address
3. Aim
4. Abstract
5. Introduction
6. Resources Used
7. Brief Description
8. Program Code
9. Output
10. Advantages and
Disadvantages
11. Conclusion
12. Future Scope
13. Reference
Aim
To develop an efficient and user-friendly
application that provides real-time currency
conversion, allowing users to quickly and
accurately convert amounts between different
currencies.
Abstract
This project presents a Real-Time Currency
Converter Application designed to facilitate easy
currency conversion for users globally. By
utilizing live exchange rate data, the application
allows users to input amounts in one currency and
receive the converted amount in another. The
application is intended for travelers, businesses,
and anyone who needs to conduct transactions
involving multiple currencies.
Introduction
In an increasingly globalized world, the need for
accurate currency conversion has become
essential. Traditional methods of conversion can
be time-consuming and prone to errors. This
application addresses these challenges by
providing real-time conversion rates and a simple
interface for users. The application connects to an
online API to fetch live exchange rates, ensuring
users receive the most current information.
Resources Used
Programming Language: Python
Framework: Flask (for web
application)
API: Open Exchange Rates API (or
any
suitable currency conversion API)
Frontend: HTML, CSS, JavaScript
Database: SQLite (for storing user
history)
Development Environment: Visual
Studio Code
Version Control: Git
Brief Description
The Real-Time Currency Converter Application
allows users to:
1. Select the source currency and
target
currency from dropdown menus.
2. Input the amount they wish to
convert.
3. View the converted amount
instantly,
updated in real-time.
4. Access a history of previous
conversions.
The application is built using Flask for the
backend, which handles API requests and
processes user inputs. The frontend is developed
with HTML and CSS, providing a clean and
intuitive user interface.
Program Code
Python
Copy code
from flask import Flask,
render_template, request
import requests
app = Flask(__name__)
API_KEY = 'YOUR_API_KEY'
BASE_URL =
'https://openexchangerates.org/api
/'
@app.route('/')
def index():
currencies = get_currencies()
return
render_template('index.html',
currencies=currencies)
def get_currencies():
response =
requests.get(f'{BASE_URL}currencie
s.json')
return response.json()
@app.route('/convert',
methods=['POST'])
def convert():
amount =
float(request.form['amount'])
from_currency =
request.form['from_currency']
to_currency =
request.form['to_currency']
converted_amount =
convert_currency(amount,
from_currency, to_currency)
return
render_template('index.html',
converted_amount=converted_amount)
def convert_currency(amount,
from_currency, to_currency):
response =
requests.get(f'{BASE_URL}convert/{
amount}/{from_currency}/
{to_currency}?app_id={API_KEY}')
return response.json()
['result']
if __name__ == '__main__':
app.run(debug=True)
Output
Upon running the application, the user is presented
with a web page that allows them to input an
amount, select the currencies for conversion, and
view the converted result in real-time.
Example Output:
Input: 100 USD to EUR
Output: 85.50 EUR (this value
changes based on live data)
Advantages and Disadvantages
Advantages:
1. Real-Time Data: Provides live
exchange
rates ensuring accurate conversions.
2. User-Friendly Interface: Simple
and
intuitive design for ease of use.
3. Accessibility: Can be accessed
from
any device with an internet
connection.
4. History Tracking: Allows users
to view their conversion history.
Disadvantages:
1. Internet Dependency: Requires
a stable internet connection for real-
time data.
2. API Limitations: Free API plans
may have limitations on requests per
day.
3. Exchange Rate Fluctuations:
Real-time rates can change
frequently, potentially leading to
inconsistencies during transactions.
Conclusion
The Real-Time Currency Converter Application
effectively meets the needs of users requiring
accurate and up-to-date currency conversions.
With its straightforward design and real-time data
integration, the application serves as a valuable
tool for travelers and businesses alike.
Future Scope
Future enhancements could include:
Mobile Application: Developing a
mobile version for better
accessibility.
Multi-Language Support: Adding
more languages for international
users.
Offline Mode: Implementing offline
caching of rates for limited
connectivity situations.
User Account System: Allowing
users to create accounts for tracking
conversion history.
References
1. Open Exchange Rates API
Documentation:
https://docs.openexchangerates.org/
2. Flask Documentation:
https://flask.palletsprojects.com/
3. Currency Conversion Algorithms:
Various online resources and articles.