retrieve_historical_rates: Retrieve historical exchange rates

View source: R/currencies.R

retrieve_historical_ratesR Documentation

Retrieve historical exchange rates

Description

Retrieves historical exchange rates between a currency pair - retrieves max. 365 days' data

Usage

retrieve_historical_rates(from, to, start_date, end_date)

Arguments

from

A currency code (see currencies() for supported codes)

to

A currency code

start_date

A start date (of the form "2010-01-01")

end_date

An end date

Value

A data.frame containing exchange rate data for select currency pair

Examples

## Not run: 
# Note date range >365 days', yet only 365 days' returned.
# Use historical_exchange_rates() for > 365 days'.
 priceR:::retrieve_historical_rates("USD", to = "AUD",
                                    start_date = "2018-01-01",
                                    end_date = "2020-06-30")

## End(Not run)



priceR documentation built on Oct. 22, 2023, 1:10 a.m.