yahoo as json stock quotes pounds/pence

ml enquirer ml.hnel.227484 at gmail.com
Sat Jan 27 11:18:54 EST 2018


OK, I guess this is not a solved problem, then? I don't see this on the
GnuCash FAQ page... and I figure these 2008/2009 threads are quite likely
to be outdated.

I did the following:
- checkout financequote: "git clone
https://github.com/finance-quote/finance-quote.git
- edit lib/Finance/Quote/YahooJSON.pm to change:
<<

$info{ $stocks, "last" }   = $json_price;
>>

$info{ $stocks, "last" }   = $json_price/100.;
- edit the gnc-fq-helper script to add at the top the line:

use lib '<path to my checked-out finance-quote>/lib';


This isn't a great/elegant solution. I'd be very interested to hear what
more experienced people have to say!


Thanks,

Dan


On Thu, Jan 25, 2018 at 11:55 PM, ml enquirer <ml.hnel.227484 at gmail.com>
wrote:

> Hi,
>
> I'm aware this is not a new question:
> - https://lists.gnucash.org/pipermail/gnucash-user/2008-
> November/027224.html
> - https://lists.gnucash.org/pipermail/gnucash-user/2008-April/024688.html
> - https://lists.gnucash.org/pipermail/gnucash-user/2009-
> February/028602.html
>
> but I recently found the "get quotes" feature stopped working with a very
> generic error message (more or less the same time as the change of currency
> quotes from yahoo to alphaVantage). So I switched my "Type of quote source"
> in the "Securities Editor" to "Yahoo as JSON" instead of "Yahoo Europe".
>
> However, now I see the returned values are in GBP *pence* not *pounds*, so
> 100 times larger than GnuCash expects.
>
> Most previous fixes discussed here (as far as I can see all >2 years old)
> involve various hacks at different levels in the source. Is this a solved
> problem, or do I need to follow their lead and dig around in the code?
>
> Thanks in advance!
>


More information about the gnucash-user mailing list