I
I
Ivan Ivanovich2021-02-18 15:02:09
Data request
Ivan Ivanovich, 2021-02-18 15:02:09

How to get currency by api?

Good day.

The ECB website provides api for exchange rates

For example:

Exchange rates for today - https://www.ecb.europa.eu/stats/eurofxref/eurofxre...

History of exchange rates 90 days - https://www.ecb.europa. eu/stats/eurofxref/eurofxre...

And there is also the possibility to receive courses on a specific date, but I still don't understand what request to make to get it.

Found the following line:

<gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref">

but none of the links work.

Can you please tell me what request I need to make in order to receive the exchange rate for a specific date?

UPD
There is a site https://exchangeratesapi.io that implements this feature - https://api.exchangeratesapi.io/2010-01-12 and has source code - https://github.com/exchangeratesapi/exchangeratesa.. . , but I do not know python, can someone tell me how it is implemented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2021-02-18
@IwanQ

It's not an API, just links to files.
Take the full XML ( https://www.ecb.europa.eu/stats/eurofxref/eurofxre... ) and get data for all days. It remains to enter them into your database and in the future add only current data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question