25 Feb 2019 11:18:15 UTC
- Distribution: Finance-Quote-Grab
- Module version: 15
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (168 / 0 / 0)
- KwaliteeBus factor: 1
- 31.90% Coverage
- License: gpl_3
- Perl: v5.5.0
- Activity24 month
- Download (61.7KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionKRYDE Kevin Rydeand 1 contributors
- Kevin Ryde
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,
using the page
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. 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.
The following standard
Finance::Quotefields are returned
date isodate name currency last close method source success errormsg
Plus the following extras
time ISO string "HH:MM" copyright_url
timeis 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.
currencyis the other currency. Prices are the value of an Australian dollar in the respective currency. For example in "AUDUSD" the
currencyis omitted for "AUDTWI" since "TWI" is not a defined international currency code. But it is returned for "AUDSDR", the IMF special drawing right basket.
Currency rates are downloaded just as "prices", there's no tie-in to the
Finance::Quotecurrency 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.
RBA website https://www.rba.gov.au/
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/.
Module Install Instructions
To install Finance::Quote::Grab, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Finance::Quote::Grab
For more information on module installation, please visit the detailed CPAN module installation guide.