unytics/bigfunctions

[bug]: `exchange_rate`: it does not work

diver9989 opened this issue · 3 comments

Check the bug has not already been reported

Edit function_name and the short error description in title above

  • I wrote the correct function name and a short error description in the title above

What happened and what did you expect?

image

seems like not working ;(

Hi 👋 @diver9989,

Thanks a lot for opening this issue.

Seems like https://exchangerate.host which is used in this function is not free anymore.

Let me find an alternative.

If you have one, don't hesitate to tell me

I found two open-source packages:

  1. https://github.com/MicroPyramid/forex-python : the data is from European Central Bank. It seems great but only covers 31 currencies instead of 169 currencies that were supported by exchangerate.host. https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html
  2. https://github.com/fawazahmed0/currency-api/ : 1500 github stars. Much more countries. But it seems to be missing days in the update. No data in september?

What do you think?

Finally, I changed the source to use Yahoo Finance. I re-deployed the function.
Here is the new code: https://github.com/unytics/bigfunctions/blob/main/bigfunctions/exchange_rate.yaml#L33

To me, it works.
Please re-open an issue if you encounter any other problem.

Thanks again for creating this ticket!