Finance::Quote is a Perl module to get stock and mutual fund quotes from various exchanges.
SYNOPSIS
use Finance::Quote;
$q = Finance::Quote->new;
$q->timeout(60);
$conversion_rate = $q->currency("AUD","USD");
$q->set_currency("EUR"); # Return all info in Euros.
$q->require_labels(qw/price date high low volume/);
$q->failover(1); # Set failover support (on by default).
%quotes = $q->fetch("nasdaq",@stocks);
$hashref = $q->fetch("nyse",@stocks);
This module gets stock quotes from various internet sources, including Yahoo! Finance, Fidelity Investments, and the Australian Stock Exchange. There are two methods of using this module -- a functional interface that is depreciated, and an object-orientated method that provides greater flexibility and stability.
With the exception of straight currency exchange rates, all information is returned as a two-dimensional hash (or a reference to such a hash, if called in a scalar context). For example:
%info = $q->fetch("australia","CML");
print "The price of CML is ".$info{"CML","price"};
The first part of the hash (eg, "CML") is referred to as the stock. The second part (in this case, "price") is referred to as the label.
Requirements:
· Perl
What's New in This Release: [ read full changelog ]
· IndiaMutual.pm : symbol not set in module. Bug corrected by Ajay M
· BUG correction : function isoTime - make sure $hours and $mins are treated as numbers