in reply to Re^2: Finance::Quote returns nothing and no error
in thread Finance::Quote returns nothing and no error
Looks like the API was terminated last year. Also see Finance::YahooQuote which now says
NOTE: As of November 2017, the module is no longer all that useful as Yahoo! decided to halt the API service it relies on.
Some info is available using yahoo_json if you have a recent version of Finance::Quote
pojuse strict; use warnings; use Finance::Quote; use Data::Dumper; printf "Version : %s\n", $Finance::Quote::VERSION; my $q = Finance::Quote->new(); $q->timeout(60); $q->set_currency("USD"); my $stock = 'googl'; my $info = $q->fetch("yahoo_json",$stock); print Dumper $info; printf "Latest price for %s is %s", $info->{$stock,'name'},$info->{$st +ock,'last'};
|
|---|