Getting stock prices from the ASX stopped working approx. 11th Feb 2018 when
the m.asx.com website began being redirected to the ASX home website.
If you'd prefer not to use AlphaVantage, which I believe can be intermittent
sometimes, an alternative GnuCash source for stocks is Yahoo as JSON.
Unfortunately, source Yahoo as JSON in Windows was not returning a valid
date as Windows strftime function does not handle %T, so this was causing
many perl warnings. These warning did not seem to matter when only looking
up 1 stock, Finance::Quote would return date 00/00/2011 and gnc-fq-helper
would change this invalid date to the current date. But when looking up
multiple stocks (>15 in my case), it caused GnuCash to hang.
There is now a fix available so that YahooJSON.pm returns the correct date
of the stock price, but it is not yet included in the official
Finance::Quote module available from CPAN (currently version 1.47).
If you'd like to manually install the fix now, it is available on github in
my personal github repository:
in a browser, click on the Raw button which should open the contents of the
new YahooJSON.pm file on a new page.
Use Control-A to highlight it all, then paste it into a text editor, say
'Save As' over the top of the existing YahooJSON.pm:
Windows (Strawberry Perl):
To test in a cmd.exe window:
cd \Program Files (x86)\gnucash\bin\
echo (yahoo_json "CBA.AX") | perl gnc-fq-helper
The response should be the following with no warnings:
(("CBA.AX" (symbol . "CBA.AX") (gnc:time-no-zone . "2018-03-02 12:00:00")
(last . 75.73) (currency . "AUD")))
To setup a GnuCash stock to use YahooJSON for an Australian stock, in the
Tools, Security Edit window, add the .AX suffix to the Symbol to tell
YahooJSON that this stock is on the Australian Stock Exchange, and select
Single, Yahoo as JSON as the 'Type of quote source'. Eg:
Display symbol CBA
Get Online Quotes Ticked
Type of quote source Single Yahoo as JSON
Regards, Chris Good
gnucash-user mailing list
To update your subscription preferences or to unsubscribe:
If you are using Nabble or Gmane, please see
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.