currencies update fail due to yahoo discontinued service

Bug #1730527 reported by Marek Rozenberg
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Low
Maxime DOYEN

Bug Description

Hi,

I just installed the software 5.1.6, Running against GTK+ 3.22.16, running on Windows 7 Ultimate, 64 bit
- thanks for a really beautifully designed interface!

I'm using 3 currencies and trying to update them online but it does not work - it says "Update online error. Bad Request"

Tried to do it repeated times over the past week and it shows the same message - see the attached file.

Please let me know how to fix it.

Regards

Marek

Revision history for this message
Marek Rozenberg (marosub53) wrote :
description: updated
description: updated
Revision history for this message
Paul White (paulw2u) wrote :

This is not something that I use so I haven't noticed until now that I'm also seeing this problem using Homebank 5.1.6 on both Xubuntu 17.04 and Xubuntu 17.10.

No error message is displayed when trying to update the currency rates but I can confirm that the rates do not change and there is no date in the "Last modified" column.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

The yahoo api return something with http ok code
but with no currency data
that's why no error message is displayed
example:
http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in
("EURUSD","EURCHF","EURAUD","EURCAD","EURJPY","EURCNY","EURGBP")&env=store://datatables.org/alltableswithkeys

it might be temporary
or not, and I will investigate further in that case (maybe change on syntax or service usage maybe)

Revision history for this message
Marek Rozenberg (marosub53) wrote :

Thanks Maxime for looking into it.

It seems that the problem is with the yahoo service:
https://yahoo.sdx.socialdynamx.com/portal/conversation/19248672
"It has come to our attention that this service is being used in violation of the Yahoo Terms of Service. As such, the service is being discontinued. For all future markets and equities data research, please refer to finance.yahoo.com "

If that service is discontinued then Morningstar.com or maybe google provide similar service and it may be just very easy to change the retrieval URL.

Marek

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

so far I did not find a decent "free" with no hits limitation replacement
option available are:
https://stackoverflow.com/questions/3139879/how-do-i-get-currency-exchange-rates-via-an-api-such-as-google-finance

Revision history for this message
Marek Rozenberg (marosub53) wrote :

Thanks Maxime for looking into it.

I found following services but since I'm not a programmer I don't know if that can be used:

http://fixer.io/
Fixer is a free API for current and historical foreign exchange rates published by the European Central Bank.
The rates are updated daily around 4PM CET every working day.

http://www.mycurrency.net/page/Free+Currency+Converter+API

https://www.nbp.pl/homen.aspx?f=/kursy/instrukcja_pobierania_kursow_walut_en.html

Marek

Revision history for this message
Marek Rozenberg (marosub53) wrote :
Revision history for this message
Marek Rozenberg (marosub53) wrote :

...and two more API services:
https://www.barchart.com/ondemand/free-market-data-api
Up to 100 symbols per query, and up to 2,500 queries per day

https://api.tiingo.com/
https://api.tiingo.com/pricing
Requests Per Day 20,000

Revision history for this message
Marek Rozenberg (marosub53) wrote :

Hi Maxime,

One idea that came to my mind is that even if you find a good API service with some hits limitations, then it could perhaps be used in this way:

Instead of integrating it for all the users inside the code every user could subscribe to that limited service and enter their own API code in the options/settings. In this way no one will exceed the limits for the free subscription.

What do you think about that?

Marek

Maxime DOYEN (mdoyen)
Changed in homebank:
importance: Undecided → Low
status: New → Confirmed
assignee: nobody → Maxime Doyen (mdoyen)
Maxime DOYEN (mdoyen)
summary: - updating the currencies does not work
+ currencies update fail due to yahoo discontinued service
Revision history for this message
Marek Rozenberg (marosub53) wrote :

OK, Maxime, your summary is definitely correct :-)
But the main thing is - are you going to fix it using other APIs that I suggested above?

Greetings

Marek

Maxime DOYEN (mdoyen)
Changed in homebank:
milestone: none → 5.1.7
Revision history for this message
Marek Rozenberg (marosub53) wrote :

Sorry, I don't understand what that means.
Does it mean that you are planning to fix it in the next version?
or
that you will not fix it in the upcoming 5.1.7 version?

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

yes, planned for 5.1.7 to come as soon as I have finished it.

the goal here is not to pickup an exotic api service, make some development and that this api to close in 3 months. It should be reliable and with the minimal requirement to change the base currency and provide sufficient currency exchange rate, that's why I choose yahoo, as Google one was no more existing either.

There is no free service like yahoo, as the API key seems inevitable, so yes I will probably move to 1 or 2 (needs to test first) provider that have free plan, meanwhile needs to register to get an API key. And I will not provide a key by default. That means every user will need to get an API key by itself.

So I needs to evaluate (free plan to provide base currency and optionaly select target currencies)
currencylayer.com
openexchangerates.org

according to this comparison table: http://www.freecurrencyconverterapi.com/comparison

Revision history for this message
Marek Rozenberg (marosub53) wrote :

Thanks! I'm putting on a 'be patient' hat and will be waiting until 5.1.7 version comes out :-)

I hope you'll decide for openexchangerates.org since it provides the rates for the Alternative/Digital currencies as well, like BTC, ETH and LTC

Marek

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

I have started to code an API for fixer.io, to enable a free default one with no key nor register, but limited currencies thus.

And I will see for openexchangerate as well as an option for those who want to use it.
Working on a tiny JSON parser for now.

Changed in homebank:
status: Confirmed → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

(for remind)
nor currencylayer.com or openexchangerates.org enables to change the source currency in their frenn plan, so unless you pay for the API service you can only get quotes from USD

Revision history for this message
Marek Rozenberg (marosub53) wrote :

And what about the http://fixer.io/
does it allow to change the source currency?

Revision history for this message
Marek Rozenberg (marosub53) wrote :
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

fixer.io does, and I have just finished to implement the API, in replacement of yahoo, but it has limited quotes, the ones emitted from the european central bank https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html
thus it my suit for most people.

Revision history for this message
Marek Rozenberg (marosub53) wrote :

Does it mean that everyone has to use the rates against Euro? and not egains USD or SKR or GBP?

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

No, actually Fixer.io enable to change the base currency, which is good, you can convert in every way, but it does provides a limited currency set to 32: USD, JPY, BGN, CZK, DKK, GBP, HUF, PLN, RON, SEK, CHF, NOK, HRK, RUB, TRY, AUD, BRL, CAD, CNY, HKD, IDR, ILS, INR, KRW, MXN, MYR, NZD, PHP, SGD, THB, ZAR, ISK.

https://api.fixer.io/latest?base=USD&symbols=EUR,GBP
or
https://api.fixer.io/latest?base=JPY&symbols=EUR,GBP

In the opposite, currencylayer.com or openexchangerates.org don't allow the change of the base currency (so you are stick to base=USD in their free plan), but they provide more currencies.
So for those 2, anyone with anther USD base currency will be forced to buy a pay plan. SO I do hesitate to make an API for now.

Revision history for this message
Marek Rozenberg (marosub53) wrote :

Perhaps using Fixer.io would be best? 32 currencies may cover the needs of most of all the users.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

let's keep fixer.io for now.

Changed in homebank:
status: In Progress → Fix Committed
Revision history for this message
Marek Rozenberg (marosub53) wrote :

Yes, and Happy New Year!

Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
Revision history for this message
Marek Rozenberg (marosub53) wrote :

Installed the latest version and tried to update the currencies but getting error:
"Unacceptable TLS certificate"

What's wrong?

Revision history for this message
Gustavo Antonio Lutz de Matos (gustavo.lutz) wrote :

Hi all!

I recently installed Homebank 5.1.7 with Windows 10, and experienced the same problem as Marek described when I try to update the currency.

"Unacceptable TLS certificate"

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

I have copy/paste from their website sample and it uses https for this, which is not mandatory for public quote.
Anyway, this requires some addition cert files I did not included into the release.
Here they are, just unzip into the homebank installation root dir (C:\Program Files (x86)\HomeBank)

Revision history for this message
Marek Rozenberg (marosub53) wrote :

Thanks!
Works very well.

Maxime DOYEN (mdoyen)
Changed in homebank:
milestone: 5.1.7 → 5.1.8
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Released → Fix Committed
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.