I have made a C++ currency converter and I would like to link it up to an online database that will allow it to get the correct currency how would I do this in C++?
I am also a beginner with C++.
I have made a C++ currency converter and I would like to link it up to an online database that will allow it to get the correct currency how would I do this in C++?
I am also a beginner with C++.
We'll need a bit of detail here.
You wanna hook into a DB somewhere to get the current conversion rates, etc?
These guys seem to offer a free exchange rate api. I'm not very familiar with C++ though, so can't offer any advise on libraries to connect with it.
Yes, I need the currency converter to go into the database and get the currency rates along with their names.
Someone asked about exchange rates APIs before on stackoverflow, so check that out.
+1. Google Finance APIs are no longer available tho.
There's a reply in there with all sorts of other APIs.
I did see that, just wanted to point that out. Out of them the European Central Bank Feed is the easiest to deal with. You pretty much have to parse this file: https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml
Which you could download using the libcurl...
https://curl.haxx.se/libcurl/
Or whatever you like really...
If you're only doing EOD:
https://www.quandl.com/
https://curl.haxx.se/libcurl/cplusplus/
Real-time:
You'll need a feed from some platform (e.g. EBS, Hotspot, Currenex) which typically use some kind of messaging protocol for market data like ITCH or FIX.
There's also bloomberg which has a native c++ api.