Yahoo Europe quotes problem

Conor O'Neill conor_lists at puddle.co.uk
Tue Nov 4 10:30:15 EST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Reiser wrote:
>> Based on the response I've received from
>> http://rt.cpan.org/Public/Bug/Display.html?id=40169
>> I'd say that the newest finance-quote maintainer is interested in
>> solving the problem. It might even happen in a week or two.
>>
>> The patch I posted in that thread results in a supposedly valid quote
>> for gnucash, but f-q isn't recognizing the GBp as pence, so the quote
>> passed to gnucash is 100x the real value. I think a recent patch in f-
>> q stomped on the logic in Base.pm that handled that correctly in prior
>> versions. But I haven't verified that yet.
> 
> OK. I figured out why the fund quotes weren't getting scaled from pence
> to pounds (the exchange can't really be set for the fund symbols, so the
> quote won't trigger the code that's already there).
> 
> So I did a quick and dirty hack that works for me for European fund
> quotes using ISIN-based symbols (i.e., the ISIN followed by the 3-letter
> currency), normal London exchange stock quotes, and Yahoo US based quotes.
> 
> If you're feeling adventurous, and don't want to wait for finance-quote
> real programmers to fix this the right way, you could apply the attached
> patch to the  Yahoo modules in Finance-Quote 1.15.
> 
> If you test with 'gnc-fq-dump -v europe $symbol' you'll notice that
> yahoo europe will always complain about an error. That's because they
> have screwed up the Fields and Responses. My patch shuffles fields
> around so that the errors occur after all the data you need is already
> available to finance-quote for each security.
> 
> Inside gnucash, the modified f-q 1.15 retrieves the quotes without
> complaint, and seems to get the right numbers, at least for GB funds.
> 
> I'm not a programmer, but I can copy and paste semi-intelligently.
> 
> Dave
> -- 
> David Reiser
> dbreiser at earthlink.net

Many thanks for this. I have updated Finance::Quote to version 1.15,
then applied your patches, and this is working for me. Again, many
thanks for the effort you put into this.

[ I've also been getting some intermittent failures of some of the feeds
while I'm testing this; perhaps the web site is having hiccups today. ]

- --
Conor O'Neill, at home in Bristol, UK
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iEYEARECAAYFAkkQaoYACgkQCwQW0BrpBZ47cACeMflsFyncKIoiL4awmIOo3vMl
q0gAnRqq8WN/BJOx4Aij8TFsZHIePW8e
=JuLB
-----END PGP SIGNATURE-----



More information about the gnucash-user mailing list