NAME

Finance::Quote - Get stock and mutual fund quotes from various exchanges

SYNOPSIS

use Finance::Quote;
my $q = Finance::Quote->new;          # New Finance::Quote object.
$q->timeout(60);		       # Timeout max of 60 seconds
%quotes = $q->yahoo(@symbols);	       # NYSE quotes 
%quotes = $q->yahoo_europe(@symbols); # Europe quotes
%quotes = $q->fidelity(@symbols);     # Fidelity Investments Quotes
%quotes = $q->troweprice(@symbols);   # Quotes from T. Rowe Price
%quotes = $q->vanguard(@symbols);     # Quotes from Vanguard Group
%quotes = $q->asx(@symbols);          # Australian quotes from ASX.
%quotes = $q->tiaacref(@symbols);     # Annuities from TIAA-CREF
print ("the last price was ", $quotes{"IBM", "last"} );

DESCRIPTION

This module gets stock quotes from various internet sources, including Yahoo! Finance and Fidelity Investments. The functions will return a quote for each of the stock symbols passed to it. The return value of each of the routines is a hash, which may include one or more of the following elements:

name         Company or Mutual Fund Name
last         Last Price
high	 Highest trade today
low		 Lowest trade today
date         Last Trade Date  (MM/DD/YY format)
time         Last Trade Time
             Change
p_change     Percent Change from previous day's close
volume       Volume
             Average Daily Vol
bid          Bid
ask          Ask
close        Previous Close
open         Today's Open
             Day's Range
             52-Week Range
eps          Earnings per Share
pe           P/E Ratio
             Dividend Pay Date
             Dividend per Share
             Dividend Yield
cap          Market Capitalization
nav          Net Asset Value
yeild        Yeild (usually 30 day avg)

(Elements which are not yet implemented have no key associated
 with them.  Not all methods return all keys at all times.)

You may optionally override the default LWP timeout of 180 seconds by setting $quote->timeout() or Finance::Quote::timeout() to your preferred value.

Note that prices from the Australian Stock Exchange (ASX) are in Australian Dollars. Prices from Yahoo! Europe are in euros. All other prices are in US Dollars.

For TIAA and CREF Annuities, you must use TIAA-CREF's pseudosymbols. These are as follows:

Stock:				CREFstok
Money Market:			CREFmony
Equity Index:			CREFequi
Inflation-Linked Bond:		CREFinfb
Bond Market:			CREFbond
TIAA Real Estate:			TIAAreal
Social Choice:			CREFsoci
Teachers PA Stock Index:		TIAAsndx
Global Equities:			CREFglob
Teachers PA Select Stock:		TIAAsele
Growth:				CREFgrow

FAQ

If there's one question I get asked over and over again, it's how did I figure out the format string? Having typed the answer in innumerable emails, I figure sticking it directly into the man page might help save my fingers a bit...

If you have a My Yahoo! (http://my.yahoo.com) account, go to the following URL:

http://edit.my.yahoo.com/config/edit_pfview?.vk=v1

Viewing the source of this page, you'll come across the section that defines the menus that let you select which elements go into a particular view. The <option> values are the strings that pick up the information described in the menu item. For example, Symbol refers to the string "s" and name refers to the string "l". Using "sl" as the format string, we would get the symbol followed by the name of the security.

If you have questions regarding this, play around with $QURL, changing the value of the f parameter.

COPYRIGHT

Copyright 1998, Dj Padzensky
Copyright 1998, 1999 Linas Vepstas
Copyright 2000, Yannick LE NY (update for Yahoo Europe and YahooQuote)
Copyright 2000, Paul Fenwick (update for ASX)
Copyright 2000, Brent Neal (update for TIAA-CREF)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

The information that you obtain with this library may be copyrighted by Yahoo! Inc., and is governed by their usage license. See http://www.yahoo.com/docs/info/gen_disclaimer.html for more information.

The information that you obtain with this library may be copyrighted by the ASX, and is governed by its usage license. See http://www3.asx.com.au/Fdis.htm for more information.

The information that you obtain with this library may be copyrighted by TIAA-CREF, and is governed by its usage license.

Other copyrights and conditions may apply to data fetched through this module.

AUTHORS

Dj Padzensky (C<djpadz@padz.net>), PadzNet, Inc.
Linas Vepstas (C<linas@linas.org>)
Yannick LE NY (C<y-le-ny@ifrance.com>)
Paul Fenwick (C<pjf@schools.net.au>)
Brent Neal (C<brent@phys.lsu.edu>)

The Finance::Quote home page can be found at http://finance-quote.sourceforge.net/

The Finance::YahooQuote home page can be found at http://www.padz.net/~djpadz/YahooQuote/

The GnuCash home page can be found at http://www.gnucash.org/