yahoo as json stock quotes pounds/pence

Dave H hellvee at gmail.com
Sat Jan 27 16:02:50 EST 2018


This came about because of an issue reported in early November last year
and is considered solved I believe ....

What version of Finance Quote are you running as it all changed about then
???

> On 06/11/17 22:43, Erik Colson wrote:
>> New version 1.43 of Finance-Quote is available with the following
changes:
>
> All prices from AlphaVantage are being returned 100 times too big as
> pence rather than pounds. For example, a price of £7.329 is being
> returned as £732.90. This is making stock values 100 times too big in
> gnucash.

division by 100 will be added in F::Q v1.45

Cheers Dave H.


On 28 January 2018 at 02:18, ml enquirer <ml.hnel.227484 at gmail.com> wrote:

> 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!
> >
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


More information about the gnucash-user mailing list