dev-xero / cpp-fx

C++ script that fetches fx-rates against the USD and writes it to a text file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ FX

A tool that fetches the exchange rates of various currencies against the US Dollar, and writes them to a local text file.

Usage

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

Implementation

  1. We use cURL to fetch data from the API endpoint.
  2. The data is received as a JSON, which we then parse and write to a local file.

About

C++ script that fetches fx-rates against the USD and writes it to a text file

License:GNU General Public License v3.0


Languages

Language:C++ 54.9%Language:CMake 45.1%