![]() Registered Member ![]()
|
Thanks. A couple of stock symbols needed to be changed. For example RDS.A needed to be changed to RDS-A. Thanks for posting.
|
![]() Registered Member ![]()
|
[quote="mdolnik"]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). Thank You Very Much for posting this fix! I really appreciate your support. |
![]() Registered Member ![]()
|
I found the date format ![]() https://query1.finance.yahoo.com/v7/fin ... mbols=goog -> "regularMarketPrice":1023.72,"regularMarketTime":1525377602 Timestamp Converter - https://www.unixtimestamp.com/index.php 1525377602 Is equivalent to: 05/03/2018 @ 8:00pm (UTC) 2018-05-03T20:00:02+00:00 in ISO 8601 Thu, 03 May 2018 20:00:02 +0000 in RFC 822, 1036, 1123, 2822 Thursday, 03-May-18 20:00:02 UTC in RFC 2822 2018-05-03T20:00:02+00:00 in RFC 3339 |
![]() Registered Member ![]()
|
Can KMyMoney convert Unix time into a regular time format?
|
![]() KDE Developer ![]()
|
Unfortunately, this is currently not possible. If it makes sense to have such a feature (I recommend to use %s as format specifier then - see man date for details) please feel free to open a wishlist item on the KMyMoney bug tracker.
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
![]() openSuSE Leap 15.4 64bit, KF5 |
![]() Registered Member ![]()
|
Hello everyone,
I haven't posted here before, but I've been running kmymoney on linux for 3 or 4 years now (since quicken cut off my online quote access) and I found this thread searching for a working online quote source for my investments in kmymoney. I've played with various quote sources, like marketwatch.com, but really like the formatted output produced by query1.finance.yahoo.com in this thread. I've dabbled in python, so since kmymoney lets you asign a script as an online quote source, I hacked up the python script below to retrieve online quotes from query1.finance.yahoo.com and handle the unix time_t date stamp that is the issue here. It requires python 3 and should be downloaded and marked as executable. It passes the ticker price and date to kymoney as a string: price="999.99" date="mm/dd/yyyy" In kmymoney, to use kmquotes.py, create on online quote source with: URL: file:/path/to/kmquotes.py %1 Identifier: %1 Identify by: Symbol Price: price="([^"]+) Date: date="([^"]+) Date Format: %m %d %y Troubleshooting - This script uses the python logging facility to produce a log file - kmquotes.log - in the user's default working directory (/home/userid/kmquotes.log in linux). By default, this log file is only updated if an error occurs retrieving a quote. For troubleshooting purposes, the logging level can be passed to kmquotes.py in the kmymoney URL: info - a single line containing the ticker symbol, date, and price is logged every time kmquotes.py is invoked to retrieve a quote debug - more data, such as the full URL passed to finance.yahoo.com, and the full response, are logged every time kmquotes is called So set the kmymoney online quote URL to: file:/path/to/kmquotes.py %1 debug if you want to see the debug data in kmquotes.log whenever kmquotes.py is called from kmymoney. Windows issues - I normally run kmymoney and this script in linux. Before posting this here, I installed kmymoney 4.8.2, and python 3.7 in a Windows 10 VM in virtualbox, to test this in windows. I can run kmquotes.py from a windows terminal (cmd.exe) and retrieve quotes, so kmquotes can run in windows. However, I haven't figured out how to create a kmymoney online quote source in windows that runs a script. Regardless of how I set the URL to kmquotes, it fails in kmymoney when I try to retrieve online quotes with: Unable to launch: kmquotes.py XXXX Unable to update price for XXXX (empty quote data) If anyone has setup a kmymoney quote source in windows to run a script, please respond. I'm an amateur with python, so any comments are welcome.
|
![]() Registered Member ![]()
|
Is this still working for anyone?
Running KMM 5.03 on Kubuntu, I'm getting this response: Fetching URL https://query1.finance.yahoo.com/v7/fin ... s=WBC.AX... Identifier found: '' Unable to update price for WBC.AX (no price or no date) I'm noticing that the "Symbol:" field seems to be gone from "Settings > Configure KMyMoney > Online Quotes". Could that have anything to do with it? Grateful for any assistance - this is my first time trying to update stock prices via KMM and would like to get it working...! (NB Could not get Google Finance working either...) |
![]() Registered Member ![]()
|
For me using Yahoo to update stock price is still working. I'm running Ubuntu 19.10.
Do you have the field "Identify by" field in the online quotes tab? That should be set to "Symbol". If you do then check the symbol for the stock on Yahoo's web site. |
![]() Registered Member ![]()
|
Thanks, false alarm - apparently, I had just clicked "ok" in the settings box, not "update" first and then "ok". The Yahoo API recipe as posted above still works!
|
![]() Registered Member ![]()
|
FYI I found another way to import historical prices that doesn't need a script https://forum.kde.org/viewtopic.php?f=69&t=165308&p=430514#p430514
|
![]() Registered Member ![]()
|
I tired using the Yahoo-API, but could not get it to work, If I plug https://query1.finance.yahoo.com/v7/fin ... bols=FMAGX into a browser, I get a response. Does this method work for mutual funds? In Windows?
I've checked for trailing spaces and hit Update as needed, but no luck. Any ideas ![]() |
![]() Registered Member ![]()
|
And this is what I have for Yahoo and no love. Any ideas as to what I need to do ?
======================== URL: https://query1.finance.yahoo.com/v7/fin ... e&symbols=%1 Identifier: %1 Identify by: Symbol Price: "regularMarketPrice":((\d+|\d{1,3}(?:[,]\d{3})).\d+) Date: "regularMarketTime":([\d]+) Skip HTML = Checked =========================== Error message is:
|
![]() Registered Member ![]()
|
mcarpino - I'm running KMyMoney on a Windows 10 PC. A few months ago I ran into an issue with quotes refusing to update. I thought I'd try the solution presented by you but, for some reason, it's not working. When I run "Update Stock and Currency Prices" an error occurs -
I've created a new quote service, named it Google, pasted the text from your message into the configuration window and saved. Equities where changed to obtain quotes from Google. https://photos.google.com/share/AF1QipMdJFGD755owx5TqjY0jZSRP0yxHtSWWWQ2C8Ghtt0a6fDd9MlKrKU3PvyYJueyQw?key=RHpQdV9URHREN0h5QlYxZmVjVmxibTVhczc3Y0xn Any idea why data cannot be obtained? |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]