get_current_prices: Get Current Security Prices

Description Usage Arguments Value Examples

View source: R/Symbols.R

Description

Wrapper function around get_prices function that returns current prices. Adds timestamp of date pulled

Usage

1
2
get_current_prices(symbols, dividends = FALSE, error_handling = "pass",
  warning = FALSE)

Arguments

symbols

vector of stock symbol characters. can be 1 or more

dividends

logical option to add current annual dividend amount to output

error_handling

option to handle errors within foreach loop. options are 'pass', 'remove', or 'stop'

warning

logical argument to print getSymbol warnings to console

Value

tibble with 1 record per symbol with current adjusted close price

Examples

1
2
3
4
library(tidyverse)
library(quantmod)
symbols <- c("spy", "tlt")
prices <- symbols %>% get_current_prices(.)

chrishaarstick/madstork documentation built on Jan. 3, 2022, 8:34 p.m.