The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Finance::Quote::RBA - download Reserve Bank of Australia currency rates

SYNOPSIS

 use Finance::Quote;
 $q = Finance::Quote->new ('RBA');
 %rates = $q->fetch ('rba', 'AUDGBP', 'AUDUSD');

DESCRIPTION

This module downloads currency rates for the Australian dollar from the Reserve Bank of Australia,

using the page

As of June 2009 the web site terms of use,

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.

Symbols

The symbols used are "AUDXXX" where XXX is the other currency. Each is the value of 1 Australian dollar in the other currency. As of February 2019 the following symbols are available

    AUDUSD    US dollar
    AUDCNY    Chinese renminbi
    AUDJPY    Japanese yen
    AUDEUR    Euro
    AUDKRW    South Korean won
    AUDSGD    Singapore dollar
    AUDNZD    New Zealand dollar
    AUDGBP    British pound sterling
    AUDMYR    Malaysian ringgit
    AUDTHB    Thai baht
    AUDIDR    Indonesian rupiah
    AUDINR    Indian rupee
    AUDTWD    Taiwanese dollar
    AUDVND    Vietnamese dong
    AUDHKD    Hong Kong dollar
    AUDPGK    Papua New Guinea kina
    AUDCHF    Swiss franc
    AUDAED    United Arab Emirates dirham
    AUDCAD    Canadian 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 currency crosses and makes it clear which way around the rate is expressed.

The currency symbols are "id" attributes in the HTML page source so a new currency should be accessible by that code.

Fields

The following standard Finance::Quote 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.

currency is the other currency. Prices are the value of an Australian dollar in the respective currency. For example in "AUDUSD" the currency is "USD". currency is omitted for "AUDTWI" since "TWI" is not a defined international currency code. But it is returned for "AUDSDR", the IMF special drawing right basket.

OTHER NOTES

Currency rates are downloaded just as "prices", there's no tie-in to the Finance::Quote currency conversion feature.

The exchange rates page above includes an RSS feed in "cb" central bank format, but it doesn't give previous day's rates for the Finance-Quote "close" field.

SEE ALSO

Finance::Quote, LWP

RBA website https://www.rba.gov.au/

HOME PAGE

http://user42.tuxfamily.org/finance-quote-grab/index.html

LICENCE

Copyright 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, 2019 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/.