Skip to content

dcycle/currency-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

currency-exchange-rates

https://freecurrencyapi.com don't have free access to historical exchange rates data api.

Hence I am using api from https://currencybeacon.com/ .

Api response has disclaimer link.

{'meta': {'code': 200, 'disclaimer': 'Usage subject to terms: https://currencybeacon.com/terms'}, 'response': {'2024-10-22': {'HTG': 131.54578724}}, '2024-10-22': {'HTG': 131.54578724} ....}

Using format_data method we are extracting response.

** Run exchange rates functionaitlity as below :-

./scripts/fetch-currency-conversion-rates.sh <api_key> "https://api.currencybeacon.com/v1" source destinations from_date end_date [app/output_file]
./scripts/fetch-currency-conversion-rates.sh  <your_api_key>   "https://api.currencybeacon.com/v1" USD EUR,GBP 2023-01-01 2023-01-31 
./scripts/fetch-currency-conversion-rates.sh  <your_api_key>   "https://api.currencybeacon.com/v1" USD HTG 2023-01-01 2023-01-31 

If you want to write output to a json file:

apiKey=<your_api_key>
./scripts/fetch-currency-conversion-rates.sh $apiKey "https://api.currencybeacon.com/v1" USD HTG 2023-01-01 2023-01-31 ./app/unversioned/result.json

** RUN tests

% ./scripts/test_fetch_currency_conversion_rates.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published