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

The Problem with Online Quotes

Tags: quotes, yahoo, online quotes, yahoo, online quotes, yahoo, online
(comma "," separated)
empenoso
Registered Member
Posts
31
Karma
0

Re: The Problem with Online Quotes

Fri Mar 16, 2018 5:14 pm
Google changed output format. Parser does not work now :'( :

Code: Select all
[Online-Quote-Source-finance.google.com]
DateFormatRegex=%y-%m-%d
DateRegex="quoteTime"\\s+content="(\\d{4}-\\d{2}-\\d{2})T
PriceRegex="price"\\s+content="((\\d+|\\d{1,3}(?:[,]\\d{3})).\\d+)
SkipStripping=true
SymbolRegex=%1
URL=https://finance.google.com/finance?q=%1


https://www.google.ru/search?q=INDEXSP:.INX
Lionel90
Registered Member
Posts
8
Karma
0
OS

Re: The Problem with Online Quotes

Thu Mar 29, 2018 4:49 pm
Hi.
My favorite quotation site also changed it's pages.
exemple: http://www.boursorama.com/bourse/opcvm/ ... 0P0001B8DU
May I ask again for some help to retrieve the prizes and dates ?

Thank you
mcarpino
Registered Member
Posts
81
Karma
0
OS

Re: The Problem with Online Quotes

Thu Mar 29, 2018 6:47 pm
On March 17th mdolnik posted this solution for quotes. viewtopic.php?f=69&t=142713&start=15 The following is his fix here for your use. Hope it's helpful.

It looks like the https://finance.google.com/finance?q=%1 link is no longer working as Google has updated their Finance site.

I haven't been able to figure out how to get google working anymore with its new changes, but I have found a way to get stock quotes and currency working with Yahoo (working as of 2018-03-17).

New / EDIT Online Stock Quote
Add a new Online Stock Quote (or edit the existing Yahoo entry)
Settings > Configure KMyMoney... > Online Quotes
Set values to the following:
Code: Select all
URL: https://query1.finance.yahoo.com/v7/fin ... e&symbols=%1
Symbol: %1
Price: "regularMarketPrice":((\d+|\d{1,3}(?:[,]\d{3})).\d+)
Date: "regularMarketTime":([\d]+)
Date Format: [empty]
Skip HTML stripping: [checked]


EDIT Online Currency Quote
Edit the "Yahoo Currency" Online Currency Quote (It looks like you cannot change the currency source so you have to modify the Yahoo Currency entry)
Settings > Configure KMyMoney... > Online Quotes
Set values to the following:
Code: Select all
URL: https://query1.finance.yahoo.com/v7/fin ... e&symbols=%1%2=X
Symbol: %1
Price: "regularMarketPrice":((\d+|\d{1,3}(?:[,]\d{3})).\d+)
Date: "regularMarketTime":([\d]+)
Date Format: [empty]
Skip HTML stripping: [checked]
malato
Registered Member
Posts
1
Karma
0

Re: The Problem with Online Quotes

Wed Apr 25, 2018 6:20 pm
Hiya
i have quite a hard time to make kmymoney recognize my stocks and funds: they're almost all italian, but one irish fund
any idea what should i do?
Lionel90
Registered Member
Posts
8
Karma
0
OS

Re: The Problem with Online Quotes

Sat Jul 21, 2018 5:19 pm
Hi
I'm having some trouble with the windows version.
For some reasons I can't get the online currency to work.
Here are my settings: (using the ones above)
Image

And the error message when I try to update the currencies (in this case swiss francs to euros)
Image

for some reasons I can't figure something is added to the URL.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: The Problem with Online Quotes

Sat Jul 21, 2018 5:56 pm
I am wondering, where this %0A%0A comes from at the end of the URL. Is this an EOL problem, since %0A is a LineFeed? Which version of KMyMoney is this?


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

Re: The Problem with Online Quotes

Sun Jul 22, 2018 6:44 am
This is version 4.8.1 for Windows
empenoso
Registered Member
Posts
31
Karma
0
I collected all scripts for parsing different sites. They work for me. :)
I hope this will be useful to someone.

The easiest way is insert all codes in file "kmymoneyrc".
Windows 10 path: "c:\Users\USER1\AppData\Roaming\.kde4\share\config\kmymoneyrc"

Code: Select all
[Online-Quote-Source-KMyMoney Currency]
CSVURL=
DateFormatRegex=%d/%m/%y
DateRegex=updated\\s\\d+:\\d+:\\d+\\(\\w+\\)\\s+(\\d{1,2}/\\d{2}/\\d{4})
IDBy=0
IDRegex=https://fx-rate.net/([^/]+/[^/]+)
PriceRegex=1\\s[^=]+\\s=</span><br\\s/>\\s([^\\s]+)
SkipStripping=true
URL=https://fx-rate.net/%1/%2

[Online-Quote-Source-Yahoo Currency]
DateFormatRegex=%d/%m/%y
DateRegex=updated\\s\\d+:\\d+:\\d+\\(\\w+\\)\\s(\\d{1,2}\\/\\d{2}\\/\\d{4})
PriceRegex=1\\s[^=]+\\s=<\\/span><br\\s\\/>\\s([^\\s]+)
SkipStripping=true
SymbolRegex=href="https:\\/\\/fx-rate.net\\/([^\\/]+\\/[^\\/]+)
URL=https://fx-rate.net/%1/%2

[Online-Quote-Source-bonds.finam.ru corp]
DateFormatRegex=%d.%m.%y
DateRegex=Дата:</td>\r        <td align="right" bgcolor="#FFFFFF">(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=<td align="right" bgcolor="#EFEFEF">[^0-9]*([0-9,\\s\\.]+).*
SkipStripping=true
SymbolRegex=
URL=http://bonds.finam.ru/issue/%1/default.asp

[Online-Quote-Source-bonds.finam.ru gov]
DateFormatRegex=%d.%m.%y
DateRegex=Дата:</td>\r        <td align="right" bgcolor="#FFFFFF">(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=<td align="right" bgcolor="#EFEFEF">[^0-9]*([0-9,\\s\\.]+).*
SkipStripping=true
SymbolRegex=
URL=http://bonds.finam.ru/issue/%1/default.asp?resultsType=5

[Online-Quote-Source-boursorama.com bonds in % Berlin / Bremen ]
DateFormatRegex=%d/%m/%y
DateRegex=class="time-short">(\\+\\+\\+\\+\\+)
PriceRegex=<meta itemprop="price" content="([0-9]+.\\+)" />
SkipStripping=true
SymbolRegex=
URL=http://www.boursorama.com/cours.phtml?symbole=%1

[Online-Quote-Source-boursorama.com bonds in % Stuttgart]
DateFormatRegex=%d/%m/%y
DateRegex=change</td>\t\t\t    \t\t\t<td>(\\+\\+\\+\\+\\+)
PriceRegex=<b><span class="cotation">([0-9]+.\\+)
SkipStripping=true
SymbolRegex=
URL=http://www.boursorama.com/cours.phtml?symbole=%1

[Online-Quote-Source-domofond.ru realty Perm]
DateFormatRegex=%d.%m.%y
DateRegex=
PriceRegex='мар.18' ,[^0-9]*([0-9,\\s\\.]+).*
SkipStripping=true
SymbolRegex=
URL=http://www.domofond.ru/tseny-na-nedvizhimost/permskiy_kray/perm/sverdlovskiy-d219

[Online-Quote-Source-finance.google.com]
DateFormatRegex=%y-%m-%d
DateRegex="quoteTime"\\s+content="(\\d{4}-\\d{2}-\\d{2})T
PriceRegex="price"\\s+content="((\\d+|\\d{1,3}(?:[,]\\d{3})).\\d+)
SkipStripping=true
SymbolRegex=%1
URL=https://finance.google.com/finance?q=%1

[Online-Quote-Source-finance.yahoo.com]
DateFormatRegex=
DateRegex="regularMarketTime":([\\d]+)
PriceRegex="regularMarketPrice":((\\d+|\\d{1,3}(?:[,]\\d{3})).\\d+)
SkipStripping=true
SymbolRegex=%1
URL=https://query1.finance.yahoo.com/v7/finance/quote?fields=regularMarketPrice&symbols=%1

[Online-Quote-Source-gold.investfunds.ru coins]
DateFormatRegex=%d.%m.%y
DateRegex=style="text-align:left;">(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=<td id="pos1" style="text-align:left;">[^0-9]*([0-9,\\s\\.]+).*</td>
SkipStripping=true
SymbolRegex=
URL=http://gold.investfunds.ru/cbr_coins/%1

[Online-Quote-Source-markets.businessinsider.com bonds in %]
DateFormatRegex=%m/%d/%y
DateRegex=\t\t\t\t\t\t\t\t\t(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=<span class="price-row-price">([0-9.]+.\\d+)
SkipStripping=true
SymbolRegex=
URL=http://markets.businessinsider.com/bonds/%1

[Online-Quote-Source-morningstar.co.uk EUR]
DateFormatRegex=%d/%m/%y
DateRegex=class="heading"><br />(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=class="line text">EUR[^0-9]*([0-9,\\.]+).*
SkipStripping=true
SymbolRegex=
URL=http://www.morningstar.co.uk/uk/etf/snapshot/snapshot.aspx?id=%1

[Online-Quote-Source-morningstar.co.uk USD]
DateFormatRegex=%d/%m/%y
DateRegex=class="heading"><br />(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=class="line text">USD[^0-9]*([0-9,\\.]+).*
SkipStripping=true
SymbolRegex=
URL=http://www.morningstar.co.uk/uk/etf/snapshot/snapshot.aspx?id=%1

[Online-Quote-Source-news.yandex.ru/quotes/]
DateFormatRegex=%d.%m.%y
DateRegex=<td class="quote__date">(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=<span class="quote__sgn"></span>[^0-9]*([0-9,\\s\\.]+).*</td>
SkipStripping=true
SymbolRegex=
URL=https://news.yandex.ru/quotes/%1.html

[Online-Quote-Source-pif.investfunds.ru mutual funds]
DateFormatRegex=%d.%m.%y
DateRegex=<th width="14%" class="nowrap main">(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=<td class="nowrap main"><b>[^0-9]*([0-9,\\s\\.]+).*</b></td>
SkipStripping=true
SymbolRegex=
URL=https://investfunds.ru/funds/%1/

[Online-Quote-Source-world.investfunds.ru/etf/]
DateFormatRegex=%d.%m.%y
DateRegex=<td class="text_left">(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=<div class="price left">[^0-9]*([0-9,\\s\\.]+).*
SkipStripping=true
SymbolRegex=
URL=https://investfunds.ru/etf/%1/

[Online-Quote-Source-www.boerse-berlin.com bonds]
DateFormatRegex=%d/%m/%y
DateRegex=_dateTime">(\\d+\\D+\\d+\\D+\\d+)
PriceRegex=_last">(\\d+\\.\\d+)
SkipStripping=true
SymbolRegex=
URL=https://www.boerse-berlin.com/index.php/Bonds?isin=%1
User avatar
vistasp
Registered Member
Posts
3
Karma
0

Re: The Problem with Online Quotes

Thu Mar 14, 2019 1:18 pm
empenoso wrote:I collected all scripts for parsing different sites. They work for me. :)
I hope this will be useful to someone.

The easiest way is insert all codes in file "kmymoneyrc".
Windows 10 path: "c:\Users\USER1\AppData\Roaming\.kde4\share\config\kmymoneyrc"


Thank you so much! I'd been tearing my hair out because Bloomberg (which was fine earlier) had stopped working for no apparent reason. I'm using your script for Yahoo now.

Thanks once again.
maallen
Registered Member
Posts
2
Karma
0

Re: The Problem with Online Quotes

Sat Apr 20, 2019 6:30 pm
I am a new user of Kmymoney, I have read through this post on online quotes and tried some of the solutions offered but still cant get the online quotes for currency to work.
am using version 4.8.2. on windows 10. Error message is
Fetching URL ...
Malformed URL .
Unable to update price for > (empty quote data)

Any help will be appreciated as i find the software very good.
Al_
Registered Member
Posts
7
Karma
0
OS

Re: The Problem with Online Quotes

Mon Apr 22, 2019 1:12 pm
@maallen
1) Which online source did you try to use (Yahoo, MorningStar, Börse Berlin, ...)? FYI, the online source is the entry you select on the last dialog when entering a new stock.
2) Post your kmymoneyrc file in this forum. FYI, the file path on Linux is "~/.kde/share/config/kmymoneyrc". As per vistasp (see above), the path on Windows 10 is "c:\Users\USER1\AppData\Roaming\.kde4\share\config\kmymoneyrc"
flamingomingo
Registered Member
Posts
1
Karma
0
OS

Re: The Problem with Online Quotes

Fri Jul 22, 2022 3:25 pm
Someone could help and write the code so I can retrieve data for brasilian bonds (tesouro direto)

site: https://br.investing.com/rates-bonds/ntnb-6-15-aug-2022

Symbol = NTB081522=

Thanks in advanced.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: The Problem with Online Quotes

Wed Jul 27, 2022 2:34 pm
The link you provided (https://br.investing.com/rates-bonds/ntnb-6-15-aug-2022) is for a specific day (even in the future as I see it). The online quotes service of KMyMoney can only import data from a generic page that provides the date for the price information. In other cases, the current date is assumed by KMyMoney. Can you provide a link to such a page?


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

Re: The Problem with Online Quotes

Wed Jan 11, 2023 5:12 pm
Greeting
2 days ago i upgraded my old version 4.8.1 to 5.1.3 but it messed up with the online quotes.
Fortunatly, since I suspected something could go wrong, I saved the settings and rewrote them, but none of the expressions I was using before the upgrade are working now.
I noticed 2 new boxes appeared, CSV URL and Identifier, can I ask what these are for ?

EDIT:
I managed to fix my regex

Also, is there an archive function in Kmymoney (like Microsoft Money had) ?

Thank you


Bookmarks



Who is online

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