altanalytics / rameritrade

R package for the TD Ameritrade API
GNU General Public License v3.0
14 stars 8 forks source link

td_priceHistory generates Bad Request #2

Closed altanalytics closed 4 years ago

altanalytics commented 4 years ago

Error in Price History function td_priceHistory

td_priceHistory(tickers = c("AAPL", "MSFT"), startDate = Sys.Date() - 30, endDate = Sys.Date(), freq = c('30min'), accessToken = NULL) Error: 400 - Bad request.

altanalytics commented 4 years ago

This error was from not setting option scipen to 999 before building the URL. This fix is in the development version on GitHub. Alternatively, you can set options using: options(scipen=999)