Forum > General

get the value of the dollar in each currency of each country

(1/2) > >>

Ericktux:
good night brothers, does anyone know how to get the updated price of the dollar in the currency of each country?
for example to obtain the public IP I have seen that a website is consulted and a result is received.
If someone has any idea please help me.

jamie:
I am sure by now you will find it kind of hard to simply down load a single file which would nice of course if you could find a reliable link to do so..


Have a look here. It is an example of getting the current exchange rates

 Of course you need to understand C a little and a little XML.

https://www.codementor.io/@dewetvanthomas/tutorial-currency-converter-application-for-c-121yicb1es

trev:
Be aware that the terms of use for all the currency websites I've used explicitly forbid the automatic or manual systematic extraction of their data.

kapibara:
Maybe it's overkill, but using Python within Lazarus is a very powerful way of getting and updating any kind of data from the web. You could install Python4Lazarus (maintained by Alexey), write a python script and run it within a Lazarus application. From Python you could even have the script start a (headless, invisible) browser that manages logins, and then saves your data to disk. Some components in Python4Lazarus have events so you can get a notice when certain things has taken place within the script while it is running. https://github.com/Alexey-T/Python-for-Lazarus

There is a learning curve for doing this, but if the data is difficult to get it could be worth it. I use Spyder 4.0 to write and test scripts, it has code-completion. If you go this route, I suggest installing something like Spyder, write a python script that successfully grabs data and then run it from Lazarus. You probably want to parse, check and save the data in a database and being a beginner in Python I prefer doing that using Lazarus and Object Pascal.

wp:

--- Quote from: Ericktux on November 28, 2021, 04:32:50 am ---does anyone know how to get the updated price of the dollar in the currency of each country?

--- End quote ---
I have a small program for this on my github: https://github.com/wp-xyz/ExchangeRates

Navigation

[0] Message Index

[#] Next page

Go to full version