This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KMyMoney - Problem with Online Quotes

Tags: kmymoney, quotes, online kmymoney, quotes, online kmymoney, quotes, online
(comma "," separated)
oesel
Registered Member
Posts
12
Karma
0
Hi together,
im using KMyMoney for more than 10 years now, but since a few years I have big problems with updating the online quotes of my stocks/ETFs.

In the last years I used the CSV-import for the prices (historical) and made an update all 3-6 months.
Therefore I used the quotes from ARIVA in € like this: https://www.ariva.de/comstage_msci_world_trn_ucits_etf-fonds/historische_kurse?go=1&boerse_id=8&month=&currency=EUR&clean_split=1&clean_payout=1&clean_bezug=1

Last days I have updated my computer and now I'm using KMyMoney Version 5.0.8, but I have still the same problem.

I'm looking for the possibility to update my prices online again.
Historical prices (one price per trading day) are enough for me again.

Unfortunately, all my efforts in this regard have failed so far and also this topic https://forum.kde.org/viewtopic.php?f=69&t=138308&hilit=ariva with the post below has not worked for me (maybe it's too old?).
empenoso wrote:I modified the code to update from different sources.
Go into Settings/Configure KyMyMoney -> Select Online Quotes
New source is configured with following parameters :

boursorama.com bonds in % Stuttgart
Code: Select all
http://www.boursorama.com/cours.phtml?symbole=%1

<b><span class="cotation">([0-9]+.\d+)
change</td>
                      <td>(\d+\D+\d+\D+\d+)
%d/%m/%y
Put the checkbox "Do not remove HTML fragments".

boursorama.com bonds in % Berlin / Bremen
Code: Select all
http://www.boursorama.com/cours.phtml?symbole=%1

<meta itemprop="price" content="([0-9]+.\d+)" />
class="time-short">(\d+\D+\d+\D+\d+)
%d/%m/%y                     
Put the checkbox "Do not remove HTML fragments".

ariva.de
Code: Select all
http://www.ariva.de/%1/kurs


<meta itemprop="price" content="([0-9]+.\d+)" />
class="time-short">(\d+\D+\d+\D+\d+)
%d/%m/%y
Put the checkbox "Do not remove HTML fragments".

markets.businessinsider.com bonds in %
Code: Select all
http://markets.businessinsider.com/bonds/%1


<span class="price-row-price">([0-9.]+.\d+)
                           (\d+\D+\d+\D+\d+)
%m/%d/%y
Put the checkbox "Do not remove HTML fragments".


I get error messages again and again, like e.g:
Adresse http://www.ariva.de/X010.DE/kurs wird geholt ...
Die Datei oder der Ordner https://www.ariva.de/X010.DE/kurs existiert nicht.
Preis für X010.DE kann nicht aktualisiert werden (leere Kursnotizdaten)
-----------------------
Address http://www.ariva.de/X010.DE/kurs is fetched ...
The file or folder https://www.ariva.de/X010.DE/kurs does not exist.
Price for X010.DE can not be updated (empty quote data)

Can anybody help me here?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Settings (you need to enter them without the quotes which I only used here for display purposes):

Code: Select all
URL: "https://www.ariva.de/%1/kurs"
Symbol: "<div >WKN: ([^ ]+) </div>"
Price: "16\.4_p_format=[^"]+">([0-9,]+)</span>"
Date: "format=time-with-sec-or-date">([0-9\.]+)</span>"
Date Format: "%d %m %y"
Skip HTML stripping: checked
I don't know what your 'X010.DE' should be, but I just checked it with (randomly picked WKNs) A14XB9 and 823212. I get
Code: Select all
Fetching URL https://www.ariva.de/A14XB9/kurs...
URL found: https://www.ariva.de/A14XB9/kurs...
Symbol found: 'A14XB9'
Price found: '0.0587' (0,0587)
Date found: '30.12.20'
Date format found: '30.12.20' -> 'Mi. Dez. 30 2020'
Code: Select all
Fetching URL https://www.ariva.de/823212/kurs...
URL found: https://www.ariva.de/823212/kurs...
Symbol found: '823212'
Price found: '10.815' (10,815)
Date found: '30.12.20'
Date format found: '30.12.20' -> 'Mi. Dez. 30 2020'


Also, using the ISIN works
Code: Select all
Fetching URL https://www.ariva.de/DE0008232125/kurs...
URL found: https://www.ariva.de/DE0008232125/kurs...
Symbol found: '823212'
Price found: '10.815' (10,815)
Date found: '30.12.20'
Date format found: '30.12.20' -> 'Mi. Dez. 30 2020'

And with the setting:
Code: Select all
Symbol: "<div >ISIN: ([^ ]+) </div>"

the ISIN is retrieved instead of the WKN. Here's the output:
Code: Select all
Fetching URL https://www.ariva.de/DE0008232125/kurs...
URL found: https://www.ariva.de/DE0008232125/kurs...
Symbol found: 'DE0008232125'
Price found: '10.815' (10,815)
Date found: '30.12.20'
Date format found: '30.12.20' -> 'Mi. Dez. 30 2020'

That should give you enough meat for your experiments. I cool tool is the OnlineQuotesEditor which is part of Alkimia package and which I have used to generate the output.

Happy New Year!


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
oesel
Registered Member
Posts
12
Karma
0
Hi ipwizard,

I tried your settings and it worked fine - same as I know it from the past. :)
Now I get the last price of each stock.
But I'd still like to have the historical quotes of each stock.
I tried to install Alkamia in the past a few times, but I had a lot of problems with compiling the files through missing packages each time - very exhausting. :(

Since I don't want to make my newly installed system unusable by any attempts right away (has already happened to me in the past), I just set up a virtual machine with Ubuntu 20.04 LTS, so that I can try it out there first. ;)

However, I would be interested to know if this is even possible with the query of historical rates? Has anyone ever tried it and had experience?
I don't want to waste time in something that doesn't work anyway.

Thanks again and a happy new year to all of you.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Hi oesel,

the online price quote function in KMyMoney is not designed to work with lists of historical data. For that purpose, you can import prices using the CSV importer. Extracting the prices from a web-site and converting them into CSV format is out-of-scope for KMyMoney but needs to be performed by some 3rd party script/application.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
oesel
Registered Member
Posts
12
Karma
0
Hi ipwizard,

sorry for my late reply.
OK, I see what you mean. If the software is not designed to do it, then so be it.
However, I assumed it would work because I can specify a time period when retrieving quotes (from... to...).
That was the reason why I'm asked. :-)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]