Bug 469431 - Need better way to handle changes in stock price quote source
Summary: Need better way to handle changes in stock price quote source
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.3
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL: https://query1.finance.yahoo.com/v7/f...
Keywords:
: 469572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-05-06 22:59 UTC by Pete
Modified: 2024-01-22 03:17 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Image showing the set up for YahooFinance (74.82 KB, image/png)
2024-01-21 19:17 UTC, jesse
Details
Example of a successful update with the configs mentioned (43.30 KB, image/png)
2024-01-21 19:28 UTC, jesse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pete 2023-05-06 22:59:24 UTC
STEPS TO REPRODUCE
1.  Tools
2.  Update Stock and Currency Prices
3. 

OBSERVED RESULT

Fetching URL https://query1.finance.yahoo.com/v7/finance/quote?fields=regularMarketPrice&symbols=BNS.TO...
Unable to update price for BNS.TO (no price or no date)

EXPECTED RESULT

A proper stock quote.

SOFTWARE/OS VERSIONS
Linux, Ubuntu 22.04.2 LTS
Comment 1 whelanh 2023-05-07 00:35:52 UTC
For now a quick fix is to replace "/v7/" with "/v6/" in the URL  (i.e., https://query1.finance.yahoo.com/v6/finance/quote?fields=regularMarketPrice&symbols=BNS.TO).  Not sure how long this fix will work as the behavior is driven by Yahoo.
Comment 2 Thomas Baumgart 2023-05-07 05:12:46 UTC
Since, as you say, it's driven by Yahoo, there's not much we can do. Especially, since the change between v6 and v7 is not only related to the format of the data. Seems, that v7 requires a cookie. See e.g. https://stackoverflow.com/questions/44030983/yahoo-finance-url-not-working for details.

$ curl 'https://query1.finance.yahoo.com/v7/finance/quote?fields=regularMarketPrice&symbols=BNS.TO'
{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Cookie"}}}

$ curl 'https://query1.finance.yahoo.com/v6/finance/quote?fields=regularMarketPrice&symbols=BNS.TO'
{"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","typeDisp":"Equity","quoteSourceName":"Delayed Quote","triggerable":true,"customPriceAlertConfidence":"HIGH","esgPopulated":false,"market":"ca_market","marketState":"CLOSED","regularMarketPrice":66.94,"exchange":"TOR","exchangeTimezoneShortName":"EDT","exchangeTimezoneName":"America/Toronto","gmtOffSetMilliseconds":-14400000,"firstTradeDateMilliseconds":789921000000,"priceHint":2,"regularMarketTime":1683316800,"fullExchangeName":"Toronto","sourceInterval":15,"exchangeDataDelayedBy":15,"tradeable":false,"cryptoTradeable":false,"symbol":"BNS.TO"}],"error":null}}
Comment 3 Thomas Baumgart 2023-05-10 11:25:54 UTC
*** Bug 469572 has been marked as a duplicate of this bug. ***
Comment 5 steve 2023-05-11 14:53:33 UTC
(In reply to steve from comment #4)
> https://query1.finance.yahoo.com/v7/finance/
> quote?fields=regularMarketPrice&symbols=%1
> suddenly stopped working so tried changing it to
> https://query1.finance.yahoo.com/v6/finance/
> quote?fields=regularMarketPrice&symbols=%1
> as suggested, but neither work


CORRECTION: Forgot to click UPDATE before saving! It does work with v6 instead of v7...
Comment 6 Jack 2023-05-11 15:20:56 UTC
I am reopening this as a wish list to address the underlying problem, and not just this particular episode.
Although changing v7 to v6 allows KMM to continue to use Yahoo as a price source, it is only a matter of time until either Yahoo or some other source changes their results yet again, and the fix may not be so easy. 
The goal is that the price quote sources in KMM should be updated without needing a new version of the application, in some online, automated way, not requiring individuals to edit something within their local configuration.
I have altered the title of the bug, leaving in mention of Yahoo, so searches should find it, avoiding the need for filing additional bugs for the same reason.
Comment 7 Brendon Higgins 2023-05-26 01:20:18 UTC
I used the "v6" trick, and that worked for a while. But Yahoo may have removed that in the last couple of days; seems to be getting 404 not found, now.
Comment 8 Jack 2023-05-26 03:42:01 UTC
Look carefully and see if that 404 is actually what is reported by your browser (actually submit that URL to the browser.)  It looks to me like that yahoo.com is not actually returning a 404 error, but a text result (or is it json?) that says it had a 404.  See my recent reply to the forum thread at https://forum.kde.org/viewtopic.php?f=69&t=177664&sid=4376c54552faddefdae8902e1c4c1cbc&start=15.  I don't know there is much (if anything) we can do if Yahoo is trying that hard to prevent it.
Comment 9 steve 2023-05-26 13:57:41 UTC
I reverted back to v6 and it worked for a few days but stopped working as of yesterday, so now neither works
Comment 10 Pete 2023-05-26 20:41:57 UTC
Has anybody tried to use the original yahoo finance source for stock quotes?

https://finance.yahoo.com/quote/NVDA

This example is for nVidia, the GPU maker.

Some parsing would be required.
Comment 11 Jack 2023-05-26 22:27:21 UTC
That is the current quote, so KMM would have to be modified to use the current date and not parse for one.  Also, I don't know what that page looks like (i.e., how different) when then market is closed, such as after hours, or on holidays or weekends.
Comment 12 Pete 2023-05-26 22:52:03 UTC
The benefit of investing a bit of effort to get your stock quotes from the Yahoo finance home page is that Yahoo will never remove the page.

Given all the trouble we have all had with Yahoo feeds, the benefit of this investment is obvious.
Comment 13 Jack 2023-05-26 23:39:31 UTC
Yer, there will likely always be a yahoo finance main page for a stock, but I won't bet anything on Yahoo not changing the format of that page, leading to the same problem.
Comment 14 Pete 2023-05-27 00:12:36 UTC
Of course, Yahoo Finance will eventually change the visual format of the stock quote page.

But a bit of tuning of the parsing will resolve those eventual issues.

With ...v6... and ...v7... issues, nobody can resolve these.  They are fatal.

So, all in all, a small investment in effort will yield large dividends for the entire community.
Comment 15 Underdog 2023-06-06 20:25:15 UTC
I started using an AlphaVantage API (free API key) and I am able to retrieve values using the web call. My only issue is that I can’t decipher how to extract the prices into KMyMoney.

Here is a sample call provided by them and the response. If someone can help on how to extract the price and date would be appreciated.

https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=IBM&apikey=demo 9

{
“Global Quote”: {
“01. symbol”: “IBM”,
“02. open”: “127.8200”,
“03. high”: “127.9000”,
“04. low”: “125.4700”,
“05. price”: “125.6800”,
“06. volume”: “3915505”,
“07. latest trading day”: “2023-05-24”,
“08. previous close”: “128.1800”,
“09. change”: “-2.5000”,
“10. change percent”: “-1.9504%”
}
}
Comment 16 Jack 2023-06-06 20:46:23 UTC
Off the top of my head (no testing yet) the regex for price could be '"05. price": "(\d+.\d+)"' (without the single quotes) and the date '07. latest trading day": "(\d{4,4}-\d{2,2}-\d{2,2}"' with the date format '%y %m %d'.   What is within parens becomes the value and other characters match literally.  \d is a digit and {x,y} says the range of times to match.

At some point, I'll see if alphavantage would assign a key KMM could distribute, but I suspect not.  It might be possible to add this source with a missing key, and with instructions on how to obtain and use your own key.
Comment 17 Underdog 2023-06-06 20:56:40 UTC
Jack,
Thanks for the quick response on the formatting. You can request a free key for KMM at:

https://www.alphavantage.co/support/#api-key

which could be embedded into a new "Alphavantge Quote" to be added to the online quotes option in the program let me know if it works out.
Comment 18 whelanh 2023-06-07 00:04:38 UTC
(In reply to Underdog from comment #17)
> Jack,
> Thanks for the quick response on the formatting. You can request a free key
> for KMM at:
> 
> https://www.alphavantage.co/support/#api-key
> 
> which could be embedded into a new "Alphavantge Quote" to be added to the
> online quotes option in the program let me know if it works out.

Per that web page the free tier of API service is limited to 5 API requests per minute and 500 requests per day.  This could made it difficult to "update all prices" in KMM. However it would probably work for updating a few securities at a time.
Comment 19 Pete 2023-06-20 20:11:26 UTC
Yahoo Finance support is working to fix this:

Thanks for reaching out to Yahoo Finance. 
I'm sorry, but it's taking longer than we expected to fix this. Rest assured, we’re focused on getting this corrected for you.

There are several factors that go into resolving this type of issue including diagnosing, troubleshooting, and implementing the fix. As such, we're unable to provide an estimated time for when this issue will be resolved.

We appreciate your continued patience while we work to get this fixed as quickly as possible.
 
If you have additional questions or concerns, please feel free to contact us again.
Comment 20 Pete 2023-06-20 20:14:35 UTC
If you could give me the number of KMM users affected by this bug, it might raise its priority with Yahoo Finance tech support.
Comment 21 jesse 2023-06-20 20:17:21 UTC
(In reply to Pete from comment #20)
> If you could give me the number of KMM users affected by this bug, it might
> raise its priority with Yahoo Finance tech support.

I wonder if there is a way to know the number of users. 

Also, not all users may be users of this particular issue.
Comment 22 Jack 2023-06-20 22:01:46 UTC
KMM does not use any telemetry, so we really don't have any way of knowing how many users are affected.  You could count how many have commented on this bug (or any of its predecessors) or written about it on the mailing lists.  The number of folks on the cc list also contributes, but I get ALL KMM bug posts, so I only get on a cc list if I forget to uncheck the box.

I'm curious to how you worded the problem to which you posted Yahoo's response.   I'm sure that reply is just a form letter, and I don't know how the problem shows up for users of other software. but for us, all we need is a CONSISTENT response.  Any reasonable response to the URL which displays in a browser can be parsed with a regex to extract the desired information.  All they have to do is stop changing it every few years.
Comment 23 Pete 2023-06-20 22:20:54 UTC
>I'm curious to how you worded the problem to which you posted Yahoo's response.

I cannot find the original bug report in my emails.  It must have been a web form.

>I'm sure that reply is just a form letter

I can trace two levels of tech support throughout the mails with Yahoo.
Comment 24 h.h.sparrer@gmail.com 2023-06-29 16:45:03 UTC
Meanwhile, getting stock prices from Yahoo Finance needs the following parameters (in KMM settings):
    URL: https://query1.finance.yahoo.com/v8/finance/chart/%1   <== NEW

The expressions for extracting price and date are unchanged:
    Price: "regularMarketPrice":((\d+|\d{1,3}(?:[,]\d{3})).\d+)
    Date: "regularMarketTime":([\d]+)
Comment 25 whelanh 2023-06-29 16:58:31 UTC
(In reply to h.h.sparrer@gmail.com from comment #24)
> Meanwhile, getting stock prices from Yahoo Finance needs the following
> parameters (in KMM settings):
>     URL: https://query1.finance.yahoo.com/v8/finance/chart/%1   <== NEW
> 
> The expressions for extracting price and date are unchanged:
>     Price: "regularMarketPrice":((\d+|\d{1,3}(?:[,]\d{3})).\d+)
>     Date: "regularMarketTime":([\d]+)

Thank you very much!  Works perfectly. Hopefully it will continue to do so :-)
Comment 26 Paul Gover 2023-07-13 15:45:31 UTC
I wonder if there's mileage in using Yahoo's portfolio stuff.

I have a Yahoo ID, and so can log on, and set up a portfolio - a list of symbols.  It doesn't appear to want numbers of shares.
I can then export the portfolio.  This creates a CSV file containing 
Symbol	Current Price	Date	Time	Change	Open	High	Low	Volume
and other fields which I guess are populated if you provide more details on your holdings.

Other finance web sites offer similar APIs.

Advantage of this is it should be a stable API.
Disadvantage is that you need to register with Yahoo, and download the stuff outside of kmymoney;

It's possible to Import a portfolio to Yahoo; I guess the information wanted is on the Investments->Securities tab in kmymoney, except I can't find a way to say cut and paste or export it to CSV!

I tried importing this using the 5.1.3 CSV Stock Prices importer, but the damned thing requires the file to be prices and dates for one holding identified by name (what?  why on earth not symbol!), not multiple stocks.

I'll try the v8 importer script for now.
Comment 27 KB.claim 2023-12-03 17:31:54 UTC
Is there any news on getting online quotes?
I started using kMyMoney 6 month ago, and since then there are permanent issues with the online quotes.
First yahoo started to fail (and it seems to do so still), then after another weekend of researching and trying finally finance-quote worked.
Sadly this one is not working anymore, no idea what it is this time that fails - its really frustrating - instaed of a few minutes to update the accounting again the tool fails!

IS THERE ANY HINT ON WHICH DATA SOURCE FOR ONLINE RATES WORKS WITH kMyMoney AND HOW THIS CAN BE SETUP?

I use portfolio performance for years and had not the slightest problems getting online rates. Why can kmyMoney not implement a stable data source?
Comment 28 Ralf Habacker 2023-12-04 22:40:31 UTC
(In reply to KB.claim from comment #27)
> Is there any news on getting online quotes?

> I started using kMyMoney 6 month ago, and since then there are permanent
> issues with the online quotes.

You not the only one with this issue. :-/

> First yahoo started to fail (and it seems to do so still), then after
> another weekend of researching and trying finally finance-quote worked.
> Sadly this one is not working anymore, no idea what it is this time that
> fails - its really frustrating - instaed of a few minutes to update the
> accounting again the tool fails!

This is comparable to a car owner who wants to fill the gas tank of his car, but the gas stations often change the tank nozzle so that it no longer fits. 

The problem is that the operators of the Yahoo website frequently change the available interfaces so that they no longer work.
 
> IS THERE ANY HINT ON WHICH DATA SOURCE FOR ONLINE RATES WORKS WITH kMyMoney
> AND HOW THIS CAN BE SETUP?

In the settings dialog for the online quote source, you can try out this URL as a CSV URL  
https://query1.finance.yahoo.com/v7/finance/download/%1-%2?events=history&includeAdjustedClose=true 

A fairly new approach is to use a build from the 'alkquotes' branch of the kmymoney git repo, see https://invent.kde.org/office/kmymoney/-/tree/work/thb/alkquotes?ref_type=heads, which includes support for using online quotes from https://store.kde.org.
A corresponding online course source from yahoo.com has been provided, see https://store.kde.org/p/1284581/ and should be usable with the mentioned build.

> I use portfolio performance for years and had not the slightest problems
> getting online rates. 

You are using an online source with a stable interface ? But that can't be Yahoo in my opinion.

> Why can kmyMoney not implement a stable data source?

I think this has already been answered above and will be better with the new approach described above, once these customizations have been integrated into the master branch and into a stable release.

In this case, a change only needs to be made in one place, and users will be informed about it the next time they start kmymoney.
Comment 29 KB.claim 2024-01-07 08:13:18 UTC
(In reply to Ralf Habacker from comment #28)
> (In reply to KB.claim from comment #27)
>  
> > IS THERE ANY HINT ON WHICH DATA SOURCE FOR ONLINE RATES WORKS WITH kMyMoney
> > AND HOW THIS CAN BE SETUP?
> 
> In the settings dialog for the online quote source, you can try out this URL
> as a CSV URL  
> https://query1.finance.yahoo.com/v7/finance/download/%1-
> %2?events=history&includeAdjustedClose=true 
Not working. I cannot get any stock rates from any of the sources mentioned, and also FX rates are only working occasional. 


> A fairly new approach is to use a build from the 'alkquotes' branch of the
> kmymoney git repo, see
> https://invent.kde.org/office/kmymoney/-/tree/work/thb/
> alkquotes?ref_type=heads, which includes support for using online quotes
> from https://store.kde.org.
> A corresponding online course source from yahoo.com has been provided, see
> https://store.kde.org/p/1284581/ and should be usable with the mentioned
> build.
Thanks for the info, but I have no idea how to bring this to a solution for my problem. I do my accounting, want to update rates for FX and stocks to see the balance. Yet bug reports are needed, trying this, doing that, branching here, sourcing there. Most of the stuff I have an idea what is meant but no idea how this can be used to solve the issue as a user.

> > I use portfolio performance for years and had not the slightest problems
> > getting online rates. 
> 
> You are using an online source with a stable interface ? But that can't be
> Yahoo in my opinion.

Here is the website of portfolio-performance, which I use for many years and had not a single issue with rates updates. https://www.portfolio-performance.info/

Thats why I asked the next question, why this permanently and for many years makes issues in kMyMoney.


I am totally unsure what to do next, kMyMoney seems to be a - sorry to say - student playground where basic and fundamental features are not implemented or faulty for n years. 
There are no releases coming of kMyMoney, the last one was 15 month ago! The documentation is really bad and outdated and basically non existent therefore. The websites are terrible complicated, just see the download page for windows for example, feedback to a mailing list.
The whole thing therefore appears like a developers playground, and nothing made for users or a non-developer audience.
Am I wrong here?
I started with kMyMoney and am really not sure if this was a wise choice for the above said.
Instead of managing my finances I write comments here about this and that ....
Comment 30 Jack 2024-01-09 01:13:59 UTC
For your immediate issue of getting stock and currency price updates to work, I think you are currently better off using something other than this bug, either the mailing list or discuss.kde.org are probably best.  As far as I can tell, any currently working URL for yahoo uses v8 and not v7.  Perhaps kmymoney.org can add a page showing the price update settings most recently known to work, at least for yahoo and currencies.

For the larger picture, more could be done if there were more people doing it.  I have been working on a complete update of the handbook, although it is currently only accessible through git, and it does refer to versions built from master branch, not 5.1.However, the hope is that version will be released for general use in some months.  It will clearly take longer than anyone wants, and there is no definite timeline yet.
In terms of releases, no, it is true that there has been no formal release in far too long, but there are daily builds made available in several formats.  Not all fixes are added to the 5.1 branch, but some are, and some of us do use master branch for our daily work.

As for portfolio-performance or any other web site not seeming to have problems getting updated stock and currency prices - I doubt very much any of them are run by a completely volunteer staff.  As pointed out in Comment #28, the problem for KMyMoney, which gets it's updates from those sites, they often change the exact format of how they present the information, and almost any change breaks our ability to extract the information from their web page.  That is not a new problem, it has been happening as long as we have been getting prices from those sites.
Comment 31 Fabiano Caruana 2024-01-10 08:32:30 UTC
(In reply to Jack from comment #30)
> In terms of releases, no, it is true that there has been no formal release
> in far too long, but there are daily builds made available in several
> formats.  Not all fixes are added to the 5.1 branch, but some are, and some
> of us do use master branch for our daily work.

Hi Jack,

No version of Appimage Master has worked for me for at least a year (including kmymoney-master-2999-linux-gcc-x86_64).
With not a single distribution (OpenSuse 15.5, OpenSuse 15.6 alpha, OpenSuse Tumbleweed, Manjaro 23.1.1, or previously OpenSuse 15.4).
Either the AppImage could not be started at all (Speicherabbild geschrieben), or the program simply crashes as soon as, for example, just one account or an item in the left menu window is clicked on. And not just with an existing database, but also with a newly created one (and that even worked).
What can I do to get the master to work?

Greetings
Udo
Comment 32 Jack 2024-01-10 19:20:01 UTC
Fabiano - First.  lets take discussions about appimages not working out of a bug about price updates and to either discuss.kde.org or the kmymoney users' mailing list, your choice.  Just to note, we know that appimage generation has been inconsistent for a while, and has recently changed to a new system, but they really should be usable.  In the meantime, I'll check out the latest versions.  Also note that due to the system change for generating appimages,  they will no longer work on some older distributions (see https://bugs.kde.org/show_bug.cgi?id=479056) and I do not know if we will be able to fix that problem or not.
Comment 33 Pete 2024-01-10 21:14:11 UTC
Jack,

Are you aware that fx-rate fails on USD/CAD queries?

Fetching URL https://fx-rate.net/USD/CAD...
Identifier found: ''
Price found: '1.3379' (1.3379)
Unable to update price for USD > CAD (no price or no date)
Comment 34 Jack 2024-01-19 19:59:34 UTC
Unfortunately I can confirm this failure.  It will take some digging to figure out why.  However, I'm tempted to re-close this bug and open a new one for this currency failure conversion, which is NOT that same problem this bug addressed.
Comment 36 jesse 2024-01-20 01:48:16 UTC
I used this as a solution and it worked well to get the stock quotes. 
https://discuss.kde.org/t/kmymoney-updating-stock-mutual-fund-issue/1228/19

I think this will continue to be an ongoing issue due to the fact that Yahoo changes the site. Unless there is a site that provides data through a free API, which I have not found one, it will be difficult to ensure that this never breaks again. 

Is there any open source projects that would offer this? I doubt it as all programs that offer it as a service are not free-to-use. usually they come with a price/cost, and some of that is most likely used to pay for the back end services. 
Would it be worth to ping the developers of other FOSS Financial software to see how they are handling this?
Comment 37 KB.claim 2024-01-20 03:59:40 UTC
(In reply to jesse from comment #36)
> I used this as a solution and it worked well to get the stock quotes. 
> https://discuss.kde.org/t/kmymoney-updating-stock-mutual-fund-issue/1228/19
> 
> I think this will continue to be an ongoing issue due to the fact that Yahoo
> changes the site. Unless there is a site that provides data through a free
> API, which I have not found one, it will be difficult to ensure that this
> never breaks again. 
> 
> Is there any open source projects that would offer this? I doubt it as all
> programs that offer it as a service are not free-to-use. usually they come
> with a price/cost, and some of that is most likely used to pay for the back
> end services. 
> Would it be worth to ping the developers of other FOSS Financial software to
> see how they are handling this?

Excellent post.

Indeed there is one FOSS project that works incredible well with finance data and for many years not a single problem: Portfolio-Performance: https://www.portfolio-performance.info/en/
Comment 38 jesse 2024-01-20 05:08:08 UTC
Do you have a link to their source code? (Free and Open Source Software)

If so, the team can probably replicate some of what they implemented. 


 (In reply to KB.claim from comment #37)
> (In reply to jesse from comment #36)
> > I used this as a solution and it worked well to get the stock quotes. 
> > https://discuss.kde.org/t/kmymoney-updating-stock-mutual-fund-issue/1228/19
> > 
> > I think this will continue to be an ongoing issue due to the fact that Yahoo
> > changes the site. Unless there is a site that provides data through a free
> > API, which I have not found one, it will be difficult to ensure that this
> > never breaks again. 
> > 
> > Is there any open source projects that would offer this? I doubt it as all
> > programs that offer it as a service are not free-to-use. usually they come
> > with a price/cost, and some of that is most likely used to pay for the back
> > end services. 
> > Would it be worth to ping the developers of other FOSS Financial software to
> > see how they are handling this?
> 
> Excellent post.
> 
> Indeed there is one FOSS project that works incredible well with finance
> data and for many years not a single problem: Portfolio-Performance:
> https://www.portfolio-performance.info/en/
Comment 39 jesse 2024-01-20 08:13:13 UTC
I found the source code and even where they fixed the html parser for themselves. 

Looks like this may have been done by them about 6 months ago, according to the comment. 

Either way, their solution is the same as the link I posted earlier suggest. 

Their solution: 

    @SuppressWarnings("nls")
    public String rpcLatestQuote(Security security) throws IOException
    {
        return new WebAccess("query1.finance.yahoo.com", "/v8/finance/chart/" + security.getTickerSymbol())
                        .addParameter("lang", "en-US").addParameter("region", "US")
                        .addParameter("corsDomain", "finance.yahoo.com").get();
    }

You can see that they made the same update ( to change v7 to v8 and use v8/finance/chart/%1). 

I did not look at all of their code but I see that they seem to be pulling some json objects too. Perhaps someone can dig into the code and find if they have a public api they are calling. 

As of now, it seems their solution and what the linked posted before, are consistent. 

It may just be that they got to it sooner.
Comment 41 Thomas Baumgart 2024-01-20 08:56:28 UTC
Thanks to all who were chasing the code of Portfolio-Performance. I took a look and not surprisingly, it does the same as ours, just differently.

On the pros side I only see the capability to update changes in a centralized fashion but that relies on a code change that only selected people (developers) can do and requires an update of the whole program after a change. So the burden to provide a working version is on the developers.

The way KMyMoney tackles the data extraction functionality is more flexible and allows the users to make necessary modifications themselves without intervention of any developer when the data provider changes their URL or page format by simply posting the updated value to a forum and/or mailing list.

This is a problem without a 100% solution and we will be bitten again in the future when the data provider decides to make changes for whatever reason. Since the whole topic as a known issue without a solution I will close it here for good and classify it as a downstream problem.
Comment 42 KB.claim 2024-01-20 10:08:36 UTC
(In reply to Thomas Baumgart from comment #41)
> Thanks to all who were chasing the code of Portfolio-Performance. I took a
> look and not surprisingly, it does the same as ours, just differently.
> 
> On the pros side I only see the capability to update changes in a
> centralized fashion but that relies on a code change that only selected
> people (developers) can do and requires an update of the whole program after
> a change. So the burden to provide a working version is on the developers.
> 
> The way KMyMoney tackles the data extraction functionality is more flexible
> and allows the users to make necessary modifications themselves without
> intervention of any developer when the data provider changes their URL or
> page format by simply posting the updated value to a forum and/or mailing
> list.
> 
> This is a problem without a 100% solution and we will be bitten again in the
> future when the data provider decides to make changes for whatever reason.
> Since the whole topic as a known issue without a solution I will close it
> here for good and classify it as a downstream problem.

if portfolio performance on a technical level does the same i cannot say. 
as a user i can say there is a massive difference.
in portfolio performance there was not a single issue with the update of stock prices / FX.
in kmymoney they are permanent and so much that its the normal that updates dont work.
a mailing list to distribute updates - please can you explain which mailing list and how that works, because I always ended up googling for hours when updates failed again - often for days until this could be resolved.
I understand that the developer changed mode is certainly not an option for mMyMoney which has not been updated for 18 month or so.
i think the online price updates are an essential feature for a personal accounting tool.
kmm is not for the masses, it is an experimental tool with no visible development, non existent documentation and "mail lists". All fine, but it should be marked and described as such, as experimental tool that is not maintained and functions just disappear, such that people like me who are interested in managing their finances are not "lured" into a experimental software project. I wished such information was available when I researched the alternatives, e.g. GnuCash and MMX.
Comment 43 jesse 2024-01-20 16:44:43 UTC
As a fellow user for almost a decade now, I do not consider this software as you described. 
"kmm is not for the masses, it is an experimental tool with no visible development, non existent documentation and "mail lists".

As far as I can tell the software is of high quality - the reason I came to this platform from the others you mentioned. Everyone is always open to use whatever software fits their needs though. Free or paid options are available. The paid options come with some form of guarantee or Service Level Agreements so you can base your expectations. 

This software is developed by volunteers, it is provided free of charge. Developers from all over the world contribute, as they have time, to its support. They are all friendly, great developers and very supportive. From what I can tell, anyone is welcomed to use it. It has served many of users for many years(like me) and I have looked at the competitors. I have tried, most of, them and still continue to prefer this software. 

I believe there are two things we should consider:
1. The way that the portfolio handles the issue, is behind the scenes in the code itself, which is why you feel you did not have to do anything as a user. They fixed it and you upgraded at some point in time. With this approach you rely on the developers to 'fix' the issue. Luckily, somehow they must have noticed the issue and fixed it. I am not sure what the update cadence is for that software. I am not a developer but from what I've heard in mailing list and chats, the KMyMoney software is undergoing a major update. This may have caused KMyMoney updates to be further apart than usual. 

2. As stated before, KMyMoney at least gives you the option to fix the issue yourself. It is in fact more flexible than the portfolio tool. As a user, you can modify how the quote is retrieved and when a volunteer developer finds time, they can update the code and make the fix available out of the box. 

I will agree that as users, many times we just want it done for us. I also do not like spending hours trying to research how to change the parser to make it work. This also leads to many google searches and testing of many different suggestions from people on the internet. I also think that maybe, as a way to mitigate some of this, it would be helpful if there was a page where official documentation could be kept with the most up-to-date community known method to retrieve the quotes. In my experience, other software offers this type of documentation but, it does get out of date. Anyone who finds a solution would need to go there to update and share with the community. 

Thus I see KMyMoney as providing two advantages: 
1. the user community is able to update the command to retrieve the text themselves, no need to wait for developers. 
2. the user community can wait until a new version is released that includes the fix as a default. 

To me this is very impressive to have such flexibility. 

It does not mean frustrations will not occur when it breaks. As a user, if I expect the software to 'fix' it for me, then I will just need to wait for a solution to be provided in the form of the code,( and hopefully the software is not undergoing major changes that may delay the release of new version at the time). 

For reference it appears that this is the bug report for portfolio app for when the yahoo API(html scrapper) broke for them: https://github.com/portfolio-performance/portfolio/issues/3302

This was the comments in their issue log: 
"Something between. Yahoo’s data providers could for instance temporarily stop the delivery , Yahoo could adjust their API interface or implement a new technology to prevent content grabbing. On the other hand, you get what you paid for :wink:" -- https://forum.portfolio-performance.info/t/price-incorrect-in-statement-of-assets/23806/3

I think this shows that both software are: 
- pulling the data from the same place, in the same way(html scraping). KMyMoney offers two ways for it to be fixed. 
- experience the same issue. Just because you did not experience the issue yourself, does not mean the issue did not occur with that software. They were able to push the fix in rapidly but it still happened. 
- Both software are susceptible to Yahoo changing the website breaking their application.

 Thus, I do not agree with the statement you made. The quality and abilities of the tools are on par if not KMyMoney provides a more flexible solution allowing users to fix the issue even between releases. 

I am not sure how fast Portfolio-Performance responded to the issue, but they were definitely able to push the fix in to the app download package sooner. 

I am glad though that this post came up. It is the way open source software gets better. 

There are many options out there but KMyMoney is my preference. The quotes is probably the most fragile part of it due to the dependencies on external web pages.

I personally enjoy recommending and helping new users onboard to KMyMoney.
Comment 44 Brendon Higgins 2024-01-20 17:50:28 UTC
Hello all,

I think we may be (finally) getting to the nub of the real issue regarding the downside of KMyMoney's approach to gathering online quote data: It does very little to guide the user to a solution when something breaks. The user must first know that they should go into Settings->Online Quotes. Then they must select the relevant quote source. Then they must edit any number of fields of URLs and regex to match the HTML which the source returns. All of those things are very technical and require existing knowledge.

I appreciate this flexibility, but it's also obvious how anyone who is not so technically inclined or has limited time will find it all very frustrating. I don't think KMyMoney needs to automate all of this away, but what could go a very long way to easing the pain is if KMyMoney were to at least guide the user somewhere to find a solution.

So, a proposal: Why don't we make a page on, say, KDE Userbase to keep track of the latest working settings (known good as of X date), and add a prominent link to that page from within KMyMoney? That way, when a user sees that something's wrong, they will immediately go to the "canonical" place to see how (if yet known) to fix it.

This is a perrenial problem (multiple bug reports everytime something triggers this), and I think something like the above would really help users deal with it (instead of arguing on bug channels) while also being more self-reliant.

Best,
Brendon
Comment 45 KB.claim 2024-01-20 19:15:15 UTC
(In reply to Brendon Higgins from comment #44)
> Hello all,
> 
> I think we may be (finally) getting to the nub of the real issue regarding
> the downside of KMyMoney's approach to gathering online quote data: It does
> very little to guide the user to a solution when something breaks. The user
> must first know that they should go into Settings->Online Quotes. Then they
> must select the relevant quote source. Then they must edit any number of
> fields of URLs and regex to match the HTML which the source returns. All of
> those things are very technical and require existing knowledge.
> 
> I appreciate this flexibility, but it's also obvious how anyone who is not
> so technically inclined or has limited time will find it all very
> frustrating. I don't think KMyMoney needs to automate all of this away, but
> what could go a very long way to easing the pain is if KMyMoney were to at
> least guide the user somewhere to find a solution.
> 
> So, a proposal: Why don't we make a page on, say, KDE Userbase to keep track
> of the latest working settings (known good as of X date), and add a
> prominent link to that page from within KMyMoney? That way, when a user sees
> that something's wrong, they will immediately go to the "canonical" place to
> see how (if yet known) to fix it.
> 
> This is a perrenial problem (multiple bug reports everytime something
> triggers this), and I think something like the above would really help users
> deal with it (instead of arguing on bug channels) while also being more
> self-reliant.
> 
> Best,
> Brendon

Good suggestion, and thanks for describing the user experience.
kmm is for freaks and developers mostly, otherwise the tons of messages over the 20 or so options in the "support" section would not be filled with user comments - most of these are developers i guess or very skilled computer users who play around with regex for a while before opening a bugreport (which in itself is something one must register for and understand). Certainly nothing for "joe regular".

However, good suggestion, let's see if this is possible.
Comment 46 Pete 2024-01-20 20:05:49 UTC
This has been so philosophically stimulating.  Allow me to go off topic.

Copying (cursor highlight, CTRL+C) bill pay amounts from the KMM home page into payment websites is basic minimal functionality for financial software.

This broke in 2022.  https://bugs.kde.org/show_bug.cgi?id=453640

I was told to get KMM recompiled another way for Ubuntu.  https://bugs.launchpad.net/ubuntu/+source/kmymoney/+bug/2006405

This has not happened.

Could some bright KMM developer contact some bright Ubuntu developer and get this fixed.
Comment 47 jesse 2024-01-20 21:47:10 UTC
I agree Brendon. I really do not think comments like this are necessary: 
"kmm is for freaks and developers mostly," 


I do like the idea of having the web page to document what regex has worked. 
Maybe another open source project could be stood up to work as an interface and provide functionality to all financial software.
Comment 48 Brendan 2024-01-20 23:12:06 UTC
As a user for almost 20 years I find this comment pretty insulting to the developers and the users.

"kmm is not for the masses, it is an experimental tool with no visible development, non existent documentation and "mail lists"."

Go find a version from 20 years ago and tell me there has been no visible development. I'm extremely glad that's not what I was told before I started using KMM. I have found the developers to be very helpful when I run into issues and Thomas has gone way above and beyond helping track down online banking issues for me over the years.

While development has essentially stopped on 5.1 for a while now, that's because the focus is on the master version, which you are welcome to run. Of course, it's not released so it's actually experimental to some degree.

The Yahoo issue has been a problem, but blaming the KMM team make little sense. It would be nice to find the perfect solution, but sometimes that's in the eye of the beholder. I have no problem editing the Yahoo settings when there is a problem. Tracking down the latest settings is usually as easy as asking on the mailing list if you don't find it there already. I also compile KMM weekly (when things were changing) so updating through the code works for me but releases are pretty rare so that's not a great option for everyone. Maybe a simple link on the  "Update Stock and Currency" window to a web page that has the latest settings for online quotes would help. Maybe a link to the KMM Online Quote Settings page in the same window would also help, but I'm not sure that's possible with the existing code.

For now, I hope they focus on releasing the master and then maybe some wishlist items can get in their queue.

They say you get what you pay for but I think KMM is an example where we get a lot more than we pay for.

I suggest you either offer helpful suggestions and deal with what we have or find some other program to track you finances. Or better yet, join the development team and make some visible improvements.

Brendan Coupe
Comment 49 KB.claim 2024-01-21 05:48:28 UTC
(In reply to Brendan from comment #48)
> As a user for almost 20 years I find this comment pretty insulting to the
> developers and the users.
> 
> "kmm is not for the masses, it is an experimental tool with no visible
> development, non existent documentation and "mail lists"."
> 
> Go find a version from 20 years ago and tell me there has been no visible
> development. I'm extremely glad that's not what I was told before I started
> using KMM. I have found the developers to be very helpful when I run into
> issues and Thomas has gone way above and beyond helping track down online
> banking issues for me over the years.
> 
> While development has essentially stopped on 5.1 for a while now, that's
> because the focus is on the master version, which you are welcome to run. Of
> course, it's not released so it's actually experimental to some degree.
> 
> The Yahoo issue has been a problem, but blaming the KMM team make little
> sense. It would be nice to find the perfect solution, but sometimes that's
> in the eye of the beholder. I have no problem editing the Yahoo settings
> when there is a problem. Tracking down the latest settings is usually as
> easy as asking on the mailing list if you don't find it there already. I
> also compile KMM weekly (when things were changing) so updating through the
> code works for me but releases are pretty rare so that's not a great option
> for everyone. Maybe a simple link on the  "Update Stock and Currency" window
> to a web page that has the latest settings for online quotes would help.
> Maybe a link to the KMM Online Quote Settings page in the same window would
> also help, but I'm not sure that's possible with the existing code.
> 
> For now, I hope they focus on releasing the master and then maybe some
> wishlist items can get in their queue.
> 
> They say you get what you pay for but I think KMM is an example where we get
> a lot more than we pay for.
> 
> I suggest you either offer helpful suggestions and deal with what we have or
> find some other program to track you finances. Or better yet, join the
> development team and make some visible improvements.
> 
> Brendan Coupe

agree, "freak" is most likely the wrong word, let's use nerds, geeks, enthusiasts.

your and the other comments just confirm that kmm is not for the masses, the masses have no idea what nightly builds are, cannot compile (which includes me), have no idea what a mailing list is, or regexp, and most likely cannot even properly install kmm, and so on, i.e. not for the masses, just for the enthusiasts, who have worked themselves into a vast number of software developemtn and admin tools.
There is no word of blame against any developer from my side, i am solely describing the user experience, and the status of the program as perceived by someone not being that "nerd, geek, enthusiast" to understand all these tools.

The kmm website states to want to be the easiest tool to use or so - sorry, just as objectively as possible - this is far from the truth. Nothing is easy with kmm, installation, documentation, setup, online rates, depot/stocks, reports. It really needs considerable time to test and try to get ahead and there is 0 approachable documentation on most topics. 

My contribution to the project is here - by giving uncomfortable status. I was starting to help with the documentation, but there is no way i found to reasonably contribute. Send comments to jack, about what? An completely outdated pdf guide? I have not found a documentation project where one can edit ...

It appears you can retrieve stock quotes - i cant and have searched and tried and tested for days and many hours. Can you post here how you get the rates updated and FX?
Comment 50 jesse 2024-01-21 19:17:35 UTC
Created attachment 165113 [details]
Image showing the set up for YahooFinance

Trying to contribute by driving conversations is fine but I do not think the approach of name calling or any other form of aggression is necessary. Software development is challenging and especially more so when the dev teams are trying to do this on their free time and as volunteers. No developer wants it to be any harder than it needs to be. 

I believe the team here has mentioned that perhaps the real bug is the missing the documentation on how to leverage the tool to fix the online quotes. Maybe there should be a bug ticket open on that subject.  

Meanwhile, I am attaching a screenshot of my set up for YahooFinance.
Comment 51 jesse 2024-01-21 19:28:55 UTC
Created attachment 165114 [details]
Example of a successful update with the configs mentioned

Here is an example of the success message I received with these settings. 

I placed a link to the location of the online forum where I found the settings. I did not come up with them myself but can say that they worked for me on Kmymoney version: Version 5.1.3-0663fcc7b 
(Find KMM version , Toolbar > Help > About KMyMoney) 

I also agree that the average user does not know about compilations, or other tools methods that developers use. 

I think those suggestions are offered in case the user does know but if the user does not know, then the people here are very open to helping them walk through it. I've been helped in the past and am very grateful. If the user does not want to mess with it, then usually the answer is, wait until it is fixed. (At times the user is provided a link to a newer unreleased version that may include the fix they need, if available)

I think the suggestions of compiling and others are only in case the user know how to do it. Much like when the mechanic explains what needs to be done. If you ask them, they may share details on how to do it in case you want to try yourself. But to the point, most people do not want to try because they usually do not have the knowledge or the tools to try it. Not their realm of expertise.
Comment 52 Ralf Habacker 2024-01-22 03:15:14 UTC
It might be a better approach to use a csv download if available, there is not that much that can change. For fx-rate that would be 
https://fx-rate.net/historical/?c_input=%1&cp_input=%2&csv=true
Comment 53 Ralf Habacker 2024-01-22 03:17:25 UTC
For yahoo(In reply to Ralf Habacker from comment #52)
> It might be a better approach to use a csv download if available, there is not that much that can change. 

For yahoo.com this is https://query1.finance.yahoo.com/v7/finance/download/%1-%2?events=history&includeAdjustedClose=true