The Currency Exchange App is a dynamic JavaScript-based web application that facilitates currency rate management, conversion, and analysis. The app features an interactive user interface where users can:
- View current exchange rates.
- Add new currency rates.
- Update existing rates.
- Search for specific currency conversion rates.
- Perform real-time currency conversion.
- Monitor the best-performing currency pairs.
- Get live market status updates based on predefined timings.
- Fetches exchange rates from an external JSON data source.
- Displays rates in a tabular format for easy reference.
- Insert New Rate: Add a new exchange rate by specifying the base and target currencies.
- Update Rate: Update an existing exchange rate. If the rate does not exist, an error message is displayed.
- Converts a given amount from one currency to another based on the exchange rate.
- Provides error messages for invalid input or unavailable conversion rates.
- Search rates by base currency, target currency, or both.
- Displays matching rates in a readable format.
- Identifies and displays the currency pair with the highest exchange rate.
- Shows live market status (open or closed) based on predefined timings:
- Market opens at 9:00 AM and closes at 5:00 PM.
- Provides a countdown timer for the next market event.
-
Clone the repository:
git clone https://github.com/oyelajakenny/oyelajakenny.github.io.git
-
Ensure you have a live server (e.g., VSCode Live Server or any HTTP server) to serve the application.
-
Open the
index.html
file in your preferred browser.
- Launch the app in a browser.
- View the live exchange rates displayed in the table under the Current Rates section.
- Enter the base currency, target currency, and exchange rate in the Insert Rate form.
- Submit the form to add the rate to the list.
- Enter the base currency, target currency, and updated exchange rate in the Update Rate form.
- Submit the form to update the rate. If the rate doesn’t exist, you’ll receive an error.
- Use the Search Rates form to find specific rates:
- Specify the base currency, target currency, or both.
- Results will be displayed in the Search Results section.
- Enter the amount, base currency, and target currency in the Currency Converter form.
- Submit the form to see the converted amount.
- The Top Currency section displays the pair with the highest exchange rate.
- The Market Status section updates in real-time, showing whether the market is open or closed and counting down to the next event.
The app fetches currency data from the following external source:
- URL: app.json
- HTML: Structure and layout.
- CSS: Styling and responsiveness.
- JavaScript: Core functionality and DOM manipulation.
- Fetch API: For fetching external JSON data.
- Add user authentication for rate management.
- Provide real-time updates using WebSockets.
- Expand to support historical exchange rate trends.
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature-name"
- Push to the branch:
git push origin feature-name
- Create a Pull Request.
This project is licensed under the MIT License. See the LICENSE
file for details.