Skip to contents

Retrieves the most recent 1-day price snapshot for a given market index.

Usage

yf_get_index_quotes(index_symbol)

Arguments

index_symbol

Character string of the index symbol (e.g., "^GSPC" for S&P 500, "^NSEI" for Nifty 50).

Value

A tibble with the same 8-column schema as yf_download_prices: symbol, date, open, high, low, close, adj_close, volume. Returns an empty tibble on failure.

See also

Examples

if (FALSE) { # \dontrun{
yf_get_index_quotes("^GSPC")
} # }