Skip to content

Ccirhack/currency-converter-java

Repository files navigation

Currency Converter

Java console app that fetches real-time exchange rates from the OpenExchangeRates API and converts between multiple currencies interactively.

Java HTTP Client JSON

How it works

  1. Run the application
  2. Choose the currencies you want to convert between
  3. Enter the amount
  4. Get the converted value using live exchange rates

Getting started

Prerequisites

  • Java 8+
  • OpenExchangeRates API key (free tier works) — get one at openexchangerates.org
  • Internet connection

Installation

# 1. Clone the repository
git clone https://github.com/Ccirhack/currency-converter-java
cd currency-converter-java

# 2. Add your API key in src/main/java/.../OpenExchangeRateApi.java
private static final String API_KEY = "YOUR_API_KEY_HERE";

# 3. Compile and run
javac Main.java
java Main

Supported currencies

Code Currency
USD US Dollar
EUR Euro
PEN Peruvian Sol
BRL Brazilian Real
ARS Argentine Peso
COP Colombian Peso

What I learned

  • Making HTTP requests with Java HttpClient
  • Parsing JSON responses with Gson
  • Structuring a console-driven Java application
  • Working with external APIs and API keys

Contributing

Contributions are welcome. Please open an issue first to discuss any changes, then submit a pull request.

Contact

Yuan Retamozo · LinkedIn · yretamozovilca@gmail.com

About

Conversor de monedas utilizando una API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages