[Finance-quote-devel] F::Q 1.40 uploaded

Erik Colson eco at ecocode.net
Mon Nov 6 03:27:12 EST 2017


Raviraj Murdeshwar <raviraj.murdeshwar at gmail.com> writes:

> HI Erik
>
> I downloaded 'Finance-Quote-1.40.tar.gz' and tried simple example as
> follows and it's not returning the data. I have setup the API key as per
> your instructions.
>
> #!/usr/bin/perl
>
> use lib '../lib';
>
> # import module
> use Finance::Quote;
>
> # create object
> my $q = Finance::Quote->new();
>
> # retrieve stock quote
> my %data = $q->fetch('nyse', 'IBM');
>
> # print price
> print "The current price of IBM on the NYSE is " . $data{'IBM', 'price'};

Hi Raviraj,

You are correct.  That doesn't work and I didn't have time to change the
example code.  You need to change 'nyse' to 'alphavantage' to use the new
module.  I didn't test that, no time now, but the tests in
t/alphavantage.t do pass.  So take a look at that file if you want to
script yourself.

best
--
erik colson


More information about the gnucash-user mailing list