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

Online quotes Germany

Tags: None
(comma "," separated)
spondex
Registered Member
Posts
15
Karma
0

Online quotes Germany

Sun Jan 26, 2020 7:48 pm
Being a new user of KMyMoney, I am looking for the best way to set up getting online quotes for my investments.

OS Devuan Beowulf (Debian Buster without systemd), KMM 5.0.3, German language.

I'd like to avoid Yahoo and prefer a German or European facility to get the quotes from. What would be the best choice?

Additional problem: I can manually update the quotes ok. When I try to do an online connect e.g. to Finanztreff, I get the feedback that the invest has no ID. I have tried WKN and ISIN as identifier, none of them works. What do I need to enter?

Thanks, Rolf
User avatar
mepi0011
Registered Member
Posts
9
Karma
0
OS

Re: Online quotes Germany

Sat Sep 05, 2020 5:57 am
Hello Rolf,

Have you already solved your problem?

Currently I am trying to get Finanztreff running. For this I have created a copy of the settings and changed them as follows:

Code: Select all
URL = http://fonds.finanztreff.de/fonds_einzelkurs_uebersicht.htn?i=%1
Identifizierung durch = Identification number
Preis = "aktuell green">([0-9]+,\d+)
Datum = Zeit:.(\d+\D+\d+\D+\d+)
Datumsfomat = %d.%m.%y
HTML-Tags erhalöten = enabled


Unfortunately I get the following error message when querying the share price:
Code: Select all
Adresse http://fonds.finanztreff.de/fonds_einzelkurs_uebersicht.htn?i=163616 wird geholt ...
Symbol gefunden:
Datum gefunden: „Do. Sept. 3 2020“
Preis für 163616 kann nicht aktualisiert werden (kein Preis oder kein Datum)


@all: Any idea how I need to change the RexEX to get the correct price?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: Online quotes Germany

Sat Sep 05, 2020 3:15 pm
I just gave it a try and find the price info in the page source as
<td class="aktuell red">207,51 EUR</td>

So this won't match your RegEx of
"aktuell green">([0-9]+,\d+)


What happens if you change that to
"aktuell [a-z]+">(\d+,\d+)

which does not care about the color name?

Btw: \d+ ist the same as [0-9]+.

I also noticed, that this can get you in trouble in case the price is >= 1000. Example: http://fonds.finanztreff.de/fonds_einze ... n?i=166571 provides me with
<td class="aktuell red">1.378,15 EUR</td>

To catch this price, you might want to change the regex to
"aktuell [a-z]+">([\d\.]+,\d+)

which also allows the dot to appear as thousand separator of the integer part of the price.

Good luck. :) Would be cool to get some feedback if that helps.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
mepi0011
Registered Member
Posts
9
Karma
0
OS

Re: Online quotes Germany

Sun Sep 06, 2020 6:41 am
Hi ipwizard,

Thank you for your investigation.
I also made further attempts and found out that "currently red" or "currently green" depends on whether the price rises or falls.

I changed the price REgEX now to
Code: Select all
<td class="fade">\D*([0-9]+,\d+)


The solution I want to add to the source code via merge request, see here:
https://invent.kde.org/office/kmymoney/ ... equests/31


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]