The Tiingo API provides a way to access data from IEX, The Investors Exchange. This data is supplied at a much lower (intraday!) frequency than the data from Tiingo's native API.

riingo_iex_prices(
  ticker,
  start_date = NULL,
  end_date = NULL,
  resample_frequency = "5min",
  after_hours = FALSE,
  force_fill = FALSE
)

Arguments

ticker

One or more tickers to download data for from Tiingo. Can be a stock, mutual fund, or ETF. A character vector.

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

For Tiingo data, a character specified as one of: "daily", "weekly", "monthly" or "annually".

For IEX data, a character specified at the "min" or "hour" frequencies in the form: "1min", "5min", or "2hour".

For Crypto data, a character specified at the "min", "hour" or "day" frequencies similar to IEX.

after_hours

A single logical. Should pre and post market data be returned if available?

force_fill

A single logical. Some tickers do not have a trade/quote update for a given time period. If force_fill is set to TRUE, then the previous OHLC will be used to fill the current OHLC.

Details

This feed returns the most recent 2000 ticks of data at the specified frequency. For example, "5min" would return the 2000 most recent data points spaced 5 minutes apart. You can subset the returned range with start_date and end_date, but you cannot request data older than today's date minus 2000 data points.

Because the default attempts to pull 1 year's worth of data, at a 5 minute frequency, all available data will be pulled so there is no need to use start_date and end_date. Only use them if you set the frequency to hourly.

Examples

if (FALSE) { # Pulling all available minute level data for Apple riingo_iex_prices("AAPL", resample_frequency = "1min") # This would result in an error, as you are pulling outside the available range # riingo_iex_prices("AAPL", "1990-01-01", "2000-01-01", resample_frequency = "5min") }