Skip to contents

Get historic bars.

Usage

bars(
  symbols,
  timeframe,
  start = NA,
  end = NA,
  limit = 1000,
  adjustment = "all"
)

Arguments

symbols

One or more symbols.

timeframe

Timeframe for bars. Expressed in various units: `Min` or `T` for minutes, `Hour` or `H` for hours, `Day` or `D` for days, `Week` or `W` for weeks and `Month` or `M` for months.

start

Start date (YYYY-MM-DD).

end

End date (YYYY-MM-DD).

Value

A data frame.

Examples

if (FALSE) { # \dontrun{
bars("SPY", "1Hour", "2024-08-19", "2024-08-19")
bars("SPY", "5T", "2024-08-19", "2024-08-19")
} # }