Finance::Quote::RBA - download Reserve Bank of Australia currency rates
use Finance::Quote; $q = Finance::Quote->new ('RBA'); %rates = $q->fetch ('rba', 'AUDGBP', 'AUDUSD');
This module downloads currency rates for the Australian dollar from the Reserve Bank of Australia,
http://www.rba.gov.au/
using the page
http://www.rba.gov.au/Statistics/exchange_rates.html
As of June 2009 the web site terms of use set out under
http://www.rba.gov.au/Copyright/index.html
are for personal non-commercial use with proper attribution. (It will be noted material is to be used in ``unaltered form'', but the bank advises import into a charting program is permitted.) It's your responsibility to ensure your use of this module complies with current and future terms.
The symbols used are "AUDXXX" where XXX is the other currency. The following are available
AUDCNY Chinese renminbi AUDEUR Euro AUDJPY Japanese yen AUDHKD Hong Kong dollar AUDIDR Indonesian rupiah AUDMYR Malaysian ringgit AUDNZD New Zealand dollar AUDCHF Swiss franc AUDSGD Singapore dollar AUDKRW South Korean won AUDTWD Taiwanese dollar AUDGBP British pound sterling AUDUSD US dollar
Plus the RBA's Trade Weighted Index for the Australian dollar, and the Australian dollar valued in the IMF's Special Drawing Right basket of currencies.
AUDTWI Trade Weighted Index AUDSDR Special Drawing Right
The AUD in each is a bit redundant, but it's in the style of Yahoo Finance and makes it clear which way around the rate is expressed.
The following standard F-Q fields are returned
date isodate name currency last close method source success errormsg
Plus the following extras
time ISO string "HH:MM" copyright_url
time is always "16:00", ie. 4pm, currently. The bank publishes TWI (trade weighted index) values for 10am and Noon too, but not until the end of the day when the 4pm value is the latest.
time
currency is the target cross, since prices are the value of an Australian dollar in the respective currency. For example in "AUDUSD" it's "USD". currency is omitted for "AUDTWI" since "TWI" is probably not a defined international currency code. But it is returned for "AUDSDR", the IMF special drawing right basket.
currency
Currency rates are downloaded just as "prices", there's no tie-in to the Finance::Quote currency conversion feature.
Finance::Quote
The currency names in the web page are hard coded in this module, so if it's extended or changed the code probably has to be updated (though the name_to_symbol hash is a package variable as an undocumented way to perhaps allow a temporary fix externally).
name_to_symbol
Finance::Quote, LWP
RBA website http://www.rba.gov.au/
http://www.geocities.com/user42_kevin/finance-quote-grab/
Copyright 2007, 2008, 2009 Kevin Ryde
Finance-Quote-Grab 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 3, or (at your option) any later version.
Finance-Quote-Grab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Finance-Quote-Grab; see the file COPYING. If not, see http://www.gnu.org/licenses/.
To install Finance::Quote::MLC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::Quote::MLC
CPAN shell
perl -MCPAN -e shell install Finance::Quote::MLC
For more information on module installation, please visit the detailed CPAN module installation guide.