td_priceQuote | R Documentation |
Enter tickers for real time or delayed quotes returned as a list
td_priceQuote(tickers = c("AAPL", "MSFT"), output = "df", accessToken = NULL)
tickers |
One or more tickers |
output |
indication on whether the data should be returned as a list or df. The default is 'df' for data frame, anything else would be a list. |
accessToken |
A valid Access Token must be set using
|
Quotes may be delayed depending on agreement with TD Ameritrade. If the account is set up for real-time quotes then this will return real-time. Otherwise the quotes will be delayed.
a list or data frame with quote details for each valid ticker submitted
## Not run:
# Get stored refresh token
refreshToken = readRDS('/secure/location/')
# generate a new access token
accessToken = td_auth_accessToken('consumerKey', refreshToken)
# Pass one or more tickers as a vector
# accessToken is optional once it is set
quoteSPY = td_priceQuote('SPY')
quoteList = td_priceQuote(c('GOOG','TSLA'), output = 'list', accessToken)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.