getStock: Download historical stock prices as a time-series from AV

View source: R/getStock.R

getStockR Documentation

Download historical stock prices as a time-series from AV

Description

Wrapper to AV API. Requires free or premium key.

Usage

getStock(
  symbol,
  period = "daily",
  interval = NULL,
  datatype = "json",
  key = "premium"
)

Arguments

symbol

stock ticker to look up

period

period: "intraday", "daily", "weekly", "monthly"

interval

NULL for anything but intraday otherwise "1min", "5min", "15min", "30min", "60min"

datatype

"json" or "csv"

key

"premium" or "free"; the type of API key obtained from AV

Details

The argument 'interval' is only to be specified for period = 'intraday'.

Value

parsed json or csv file


shill1729/ravapi documentation built on June 1, 2025, 6:05 p.m.