This CLI program allows you to view real-time currency exchange rates and convert between them.
-
Uses Exchange-RateAPI to get currency rates that are updated daily.
-
Requires an active API key in order to work.
- Go to the Exchange-RateAPI website
- Input your e-mail address and click "Get Free Key!"
- Input your password and click "Accept Terms & Create API Key!"
- Confirm your e-mail address by clicking link that was delivered to your e-mail
- You will now be redirected to the dashboard
- Your API Key will be displayed under "API Access" section
- Run the program
- Use command
key set <API_KEY>
and replace<API_KEY>
with the key from ExchangeRate-API dashboard
- Install Rust
- Clone the repository using
git clone https://github.com/michalzarsm/currency-converter-rust
- Go into the created directory and run the command:
cargo run
orcargo run --release
for the release build
- help - Get a list of commands
- all [BASE_CURRENCY] - Get all exchange rates for base currency (default is USD)
- rate [CURRENCY_1] [CURRENCY_2] - Get the exchange rate between two currencies
- convert [CURRENCY_FROM] [CURRENCY_TO] [AMOUNT] - Convert an amount from one currency to another
- key [view/set/remove] [API_KEY] - View, set, or remove the API key
- exit - Exit the program