powered by
A function to get data from the Yahoo Finance API for symbols using a date range and interval.
get_data(symbols, from_date = "2007-01-01", to_date = NULL, interval = "1d")
A data frame or list of data frame(s) that contains data from the Yahoo Finance API for the specified symbol(s).
string. Symbol or vector of symbols.
string. Start date in "YYYY-MM-DD" format (e.g., "2007-01-01").
"YYYY-MM-DD"
"2007-01-01"
string. End date in "YYYY-MM-DD" format.
string. Data interval (see "data_intervals").
"data_intervals"
if (FALSE) { data <- get_data(c("AAPL", "MSFT")) }
Run the code above in your browser using DataLab