[GNC] Finance::Quote sometimes returns stock prices in pence

Kalpesh Patel kalpesh.patel at usa.net
Sun Mar 2 12:53:25 EST 2025


>From the latest code you can wrap lines 229 through 234 with following
Perl's if condition clause to bypass the conversion :

if  (!( (uc($stocks) eq "NXR.L") or (uc($stocks) eq "NWG.L") )) {
 ... # actual lines 229 through 234 goes here
}


-----Original Message-----
From: Adrian Holbrook <megagrumpy at hotmail.com> 
Sent: Sunday, March 02, 2025 7:04 AM
To: gnucash-user at gnucash.org
Subject: [GNC] Finance::Quote sometimes returns stock prices in pence

There is a feature in YahooJSON.pm to convert quotes on the LSE in pence to
pounds by dividing by 100. This works on the majority of quotes  but there
are some that it does not work on such as NWG.L (Natwest) and NXR.L
(Norcross). Looking at the file it appears that the division by 100 is
applied if the stock currency is identified as GBp or GBX and then the
currency is changed to GBP as well. So I assume that the currency on Yahoo
is incorrectly identified as GBP for the two stocks above. I am not sure how
to check this but if anyone can suggest a mod to correct it I would be
grateful.

Regards

adrian




More information about the gnucash-user mailing list