A tool that fetches the exchange rates of various currencies against the US Dollar, and writes them to a local text file.
The tool fetches exchange rate data from https://currencybeacon.com/
. The script must be run to get the data with your API key set as an environment variable in the current process. You can obtain an API Key by signing up to the site.
Unix systems:
export API_KEY=your_api_Key
Powershell:
$env:API_KEY=your_api_key
Once you've set your API KEY, all that's left is to run the binary:
.\bin\main
- We use
cURL
to fetch data from the API endpoint. - The data is received as a JSON, which we then parse and write to a local file.