riingo_fx_prices: Forex - Prices

Description Usage Arguments Value Examples

View source: R/fx-prices.R

Description

This function collects forex prices for specified tickers. It can return daily, hourly, and minutely data, however, the amount of returned data becomes more limited with a finer resolution.

Usage

1
2
3
4
5
6
riingo_fx_prices(
  ticker,
  start_date = NULL,
  end_date = NULL,
  resample_frequency = "1day"
)

Arguments

ticker

One or more fx tickers to download financial metrics for, such as "audusd" or "eurusd".

start_date

The first date to download data for. A character in the form YYYY-MM-DD, or a Date variable. The default is to download 1 year's worth of data.

end_date

The last date to download data for. A character in the form YYYY-MM-DD, or a Date variable.

resample_frequency

A single character specified at the "day", "min" or "hour" frequencies in the form: "1day", "1min", "5min", or "2hour".

Value

A data frame containing the fx prices for the requested tickers.

Examples

1
2
3
4
5
## Not run: 
start <- Sys.Date() - 10
riingo_fx_prices(c("audusd", "eurusd"), start_date = start)

## End(Not run)

riingo documentation built on Sept. 13, 2020, 5:15 p.m.