A problem with stock quotes
Tony Bloomfield
tonyb.lx@btinternet.com
Tue Jan 21 16:52:32 CST 2003
Using gnucash-1.7.7 and Finance::Quote 1.06.
I can get online quotes for shares quoted on Yahoo Europe. But when I try=
=20
getting prices for UK Unit Trusts, I get the error message
'There was an unknown error while retrieving the price quotes'.
Any idea how I can find the source of this error? I have verified that the=
=20
following perl program produces correct results, so it would seem that the=
=20
problem lies in gnucash rather than F::Q.
#!/usr/bin/perl -w
use lib 'Finance-Quote-1.06/lib';
use Finance::Quote;
my $q =3D Finance::Quote->new();
%quotes =3D $q->trustnet ("jupiter income");=20
# above also works with $q->uk_unit_trusts
# print some selected values
print $quotes {"jupiter income", "last"},
"\n";
# loop over and print all values.
# Notes that values are stored ion a multi-dimensional associative array
foreach $k (sort (keys %quotes)) {
($sym, $attr) =3D split ($;, $k, 2);
$val =3D $quotes {$sym, $attr};
# $val =3D $quotes {$k}; # this also works, if desired ...
print "\t$sym $attr =3D\t $val\n";
}
print "\n\n";
produces=20
------------
linux:/home/tonyb/gnucash # perl test.pl
Use of uninitialized value in print at test.pl line 18.
jupiter income ask =3D 3.0007
jupiter income bid =3D 2.8207
jupiter income currency =3D GBP
jupiter income date =3D 01/21/2003
jupiter income exchange =3D Trustnet
jupiter income method =3D trustnet
jupiter income name =3D jupiter income
jupiter income price =3D 2.8207
jupiter income source =3D http://www.trustnet.co.uk/
jupiter income success =3D 1
jupiter income yield =3D 3.87
Any help greatly appreciated!
Cheers,
TonyB
More information about the gnucash-user
mailing list