sal0max/currencies

Error: Server responded with HTTP 200

cg505 opened this issue ยท 23 comments

cg505 commented

Getting this confusing error message whenever I use Exchangerate.host. Other providers seem unaffected.
Screenshot_20230930-144533
This is 1.20.4 on a Pixel 6a running Android 13.
Thanks for taking a look, and apologies if this has already been reported.

Thanks for reporting this.

Seems like the exchangerate.host API provider sold out and the API was changed without prior notice:
Formicka/exchangerate.host#236 (comment)

I will search for alternative free provides, as I can't spend any money on this free project.

In the meantime, please switch to a different API provider in the settings, even though they don't provide the same amount of currencies.

BotBY commented

Hi and thanks for the app!
Perhaps in this situation you could allow people to insert their free API key from exchangerate.host?

Hi and thanks for the app! Perhaps in this situation you could allow people to insert their free API key from exchangerate.host?

@BotBY thanks for the suggestion. I see two issues with that:

  • Only advanced users (the kind that know how to use Github ๐Ÿ˜‰ ) would know what an API key is, how to obtain one and how to enter it
  • Probably it's against the TOCs of new owner. Would have to check that first.

Also, the free tier of the new API apparently has some really tough limitations:

  • Only HTTP/no HTTPS
  • Doesn't allow changing of the base currency

I think this API is dead for us.

Unfortunately this was the only provider for Russian rubles exchange rates... ๐Ÿ˜’
InforEuro gives EU rates which are not real life ones.

I'm working on this.

Currently, I'm investigation "official" APIs, which hopefully are more stable and keep free. I'm analyzing the data sources of several Central Banks. It looks promising, but it is very time consuming, as every API has a different format and has to be called with different rules.

My private time is very limited, right now, so this could take some days or even weeks, but I promise: I'm on it.

Maybe this is a good source:
https://www.floatrates.com/

Maybe this is a good source: https://www.floatrates.com/

Looks promising. Thanks!

However, some things I noticed:

  • They don't seem to offer historic rates in JSON format (only XML - not nice but I could work with that)
  • They don't seem to offer a timeline data API (kind of a deal breaker)
  • Maybe not necessary, but I'm not able to create an account on the site. Always getting "Form token validation failed. Please check your data and re-submit it again." error message.

Can you confirm my issues, @VasilisKos ?

Maybe this is a good source: https://www.floatrates.com/

Looks promising. Thanks!

However, some things I noticed:

  • They don't seem to offer historic rates in JSON format (only XML - not nice but I could work with that)
  • They don't seem to offer a timeline data API (kind of a deal breaker)
  • Maybe not necessary, but I'm not able to create an account on the site. Always getting "Form token validation failed. Please check your data and re-submit it again." error message.

Can you confirm my issues, @VasilisKos ?

  1. Yes. Only xml and html formats.
  2. Yes. Couldn't find anything.
  3. Sorry, but I can't check that. Don't want to give all the personal data they ask for.

The central bank of Norway provides an API with about 40 currencies, which is not an amazing number, but still better than what the ECB is offering. Might be a good alternative source?

Daily updates, JSON format, historic data available, free access without API key.

Norges Bank's API for open data offers programmatic access to selected datasets published by the bank. The service is implemented as a REST interface for querying data and metadata and offers a variety of formats for the retrieved data. The service is free to use and requires no authentication.

https://app.norges-bank.no/query/#/en/

How many calls a month does this app do? Maybe https://freecurrencyapi.com/ could work, and/or hidden api token entry for advanced users for other services

How many calls a month does this app do? Maybe https://freecurrencyapi.com/ could work, and/or hidden api token entry for advanced users for other services

As I don't track my users I have no reliable numbers. However, Play Console states, there are around 800 daily users. Based on the feedback on Github, I'd say there are around the same amount of F-Droid users. Let's say about 1500 daily users.

The app itself is very frugal in terms of API calls, as results are cached. But every timeline usage, every historical rate, and of course every daily update has to be a separate API call.

All in all I'd wager, that those 5000 free monthly usages will never ever suffice. Remember: All users would share an API key, as I can't randomly generate one for every new install.


That said, I'm right on the finishing touches of the next update. It will include two new "official" Central Bank data sources. One of them will be Norges Bank, as suggested by @s-hutter. And more are likely to come.

Unfortunately this was the only provider for Russian rubles exchange rates... ๐Ÿ˜’ InforEuro gives EU rates which are not real life ones.

Follow-up question on this remark @VasilisKos : Do you know of any providers giving real-world exchange rates to RUB? As Russia is sanctioned in the finance sector by EU and probably also USA and others, it is indeed very hard to determine realistic exchange rates.

E.g.: The last available rate for RUB that's provided by Norges Bank is from 2022-03-01. Since then it's stale:
https://app.norges-bank.no/query/index.html#/en/currency?currency=RUB&frequency=B&startdate=2022-03-01&stopdate=2023-11-17

Probably need some source from countries which still do trade with Russia, like China or India.

Unfortunately this was the only provider for Russian rubles exchange rates... ๐Ÿ˜’ InforEuro gives EU rates which are not real life ones.

Follow-up question on this remark @VasilisKos : Do you know of any providers giving real-world exchange rates to RUB? As Russia is sanctioned in the finance sector by EU and probably also USA and others, it is indeed very hard to determine realistic exchange rates.

E.g.: The last available rate for RUB that's provided by Norges Bank is from 2022-03-01. Since then it's stale: https://app.norges-bank.no/query/index.html#/en/currency?currency=RUB&frequency=B&startdate=2022-03-01&stopdate=2023-11-17

Probably need some source from countries which still do trade with Russia, like China or India.

The Xiaomi Calculator app uses Webull, which is updated every day, and accurate (confirmed). But I don't know about their service, whether it's free or not, APIs etc. You should check it.

Might the data come directly from the Bank of Russia? https://cbr.ru/eng/currency_base/daily/?UniDbQuery.Posted=True&UniDbQuery.To=18.11.2023

Could you check, @VasilisKos ? I can't easily download the Mi Calculator through the Play Store.

Might the data come directly from the Bank of Russia? https://cbr.ru/eng/currency_base/daily/?UniDbQuery.Posted=True&UniDbQuery.To=18.11.2023

Could you check, @VasilisKos ? I can't easily download the Mi Calculator through the Play Store.

Here's the link:
https://play.google.com/store/apps/details?id=com.miui.calculator

No, their data are slightly different, but quite accurate, and reliable I'd say.

Here's the link: https://play.google.com/store/apps/details?id=com.miui.calculator

Already found it, but not installable on my devices. Probably exclusive to Xiaomi devices.

No, their data are slightly different, but quite accurate, and reliable I'd say.

Thanks for the info. I see if this is something I could provide, then. Haven't found a real XML or JSON API, though. But I keep searching. And their website seems simple enough to maybe do some scraping instead.
Will likely be something for the update after the next one, though.

Here's the link: https://play.google.com/store/apps/details?id=com.miui.calculator

Already found it, but not installable on my devices. Probably exclusive to Xiaomi devices.

No, their data are slightly different, but quite accurate, and reliable I'd say.

Thanks for the info. I see if this is something I could provide, then. Haven't found a real XML or JSON API, though. But I keep searching. And their website seems simple enough to maybe do some scraping instead. Will likely be something for the update after the next one, though.

How about this?
https://github.com/fawazahmed0/currency-api

I came to echo what @VasilisKos suggested. A quick look at the code shows it is an automatic service that periodically runs a crawls undisclosed websites to find the information. So long as those websites remain operational, I think this is a good alternative for the foreseeable future.

How about this? https://github.com/fawazahmed0/currency-api

This one doesn't provide timeline data.

(Also, currently the historical rates seem to be broken: https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/2022-11-24/currencies/eur.json - see fawazahmed0/exchange-api#75)

Incoming of big new release is imminent!

Will remove exchangerate.host and include 3 new APIs:

  • Bank of Canada (unfortunately not a lot of currencies)
  • Norges Bank (sadly seems to be offline quite a lot during the night hours, CET)
  • Bank Rossii (will be our new default: really a lot of currencies + fast and stable API + reliable RUB rates on top of the "regular" ones)

I'll leave this issue open for now, for feedback from people like @VasilisKos , once they got the chance to try out the new version 1.21.0. ๐Ÿ‘

Release published: https://github.com/sal0max/currencies/releases/tag/1.21.0

Should be live in the Play Store, soon.
F-Droid always takes some days.

Release published: https://github.com/sal0max/currencies/releases/tag/1.21.0

Should be live in the Play Store, soon. F-Droid always takes some days.

Works fine! Bravo!

Thank you, everyone, for your patience.