get_tickers_history {yfinancer}R Documentation

Get historical data for multiple tickers

Description

Retrieves historical market data from Yahoo Finance for multiple specified ticker symbols.

Usage

get_tickers_history(
  tickers_obj,
  period = "1mo",
  interval = "1d",
  start = NULL,
  end = NULL,
  prepost = FALSE,
  auto_adjust = TRUE,
  back_adjust = TRUE,
  repair = TRUE,
  output = c("tibble", "response", "request"),
  proxy = NULL
)

Arguments

tickers_obj

A tickers object created with get_tickers()

period

The period to download data for (default "1mo"). Valid values are "1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max". Ignored if start and end are provided.

interval

The interval between data points (default "1d"). Valid values are "1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1wk", "1mo", "3mo".

start

Start time for query expressed as a date, datetime, or string in YYYY-MM-DD HH:MM:SS format.

end

End time for query expressed as a date, datetime, or string in YYYY-MM-DD HH:MM:SS format.

prepost

Include pre and post market data (default FALSE)

auto_adjust

Adjust all OHLC automatically (default TRUE)

back_adjust

Adjust data to reflect splits and dividends (default TRUE)

repair

Repair missing data (default TRUE)

output

Object to return. Can be "tibble", "response", or "request" (default "tibble")

proxy

Optional proxy settings

Details

See get_history for more details on the historical market data.

Value

A list of tibbles with historical market data for each ticker

Examples

## Not run: 
tech_tickers <- get_tickers(c("AAPL", "MSFT", "GOOG"))
tech_history <- get_tickers_history(tech_tickers, period = "1y")

## End(Not run)

[Package yfinancer version 0.1.3 Index]