Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am getting a HTTP error 400 on tq_get() from Yahoo #81

Closed
sunnyc7 opened this issue Nov 30, 2017 · 5 comments
Closed

I am getting a HTTP error 400 on tq_get() from Yahoo #81

sunnyc7 opened this issue Nov 30, 2017 · 5 comments

Comments

@sunnyc7
Copy link

sunnyc7 commented Nov 30, 2017

Error:

tq_get("AAPL")
[1] NA
Warning message:
x = 'AAPL', get = 'stock.prices': Error: AAPL download failed after two attempts. Error message:
HTTP error 400.

Also, when I try to use Quandl, I am getting an API Error.

R> tq_get(tick, get = "quandl", from = from)
[1] NA
Warning message:
x = 'AAPL', get = 'quandl': Error: {"quandl_error":{"code":"QECx05","message":"The url you requested is incorrect. Please use the following url instead: /api/v3/datasets/:database_code/:dataset_code."}}

my Options:

R> tq_get_options()
[1] "stock.prices"       "stock.prices.japan" "financials"         "key.stats"          "key.ratios"         "dividends"     [7] "splits"             "economic.data"      "exchange.rates"     "metal.prices"       "quandl"             "quandl.datatable"  

Did something break with the tq API ?

@sunnyc7
Copy link
Author

sunnyc7 commented Nov 30, 2017

QuantMod Yahoo downloader is broken.
joshuaulrich/quantmod#202

@mdancho84
Copy link
Collaborator

Yeah, this looks like more Yahoo fun! Yahoo is terrible.

As a workaround please install the development version using devtools::install_github("business-science/tidyquant") and use tq_get("AAPL", get = "stock.prices.google")

or

tq_get("AAPL", get = "alphavanteger") with the API key setup first (av_api_key()).

@sunnyc7
Copy link
Author

sunnyc7 commented Dec 1, 2017

@mdancho84 Thanks for that 👍
This works

devtools::install_github("business-science/tidyquant") 
library("tidyquant")
tq_get("AAPL", get = "stock.prices.google")


@sunnyc7 sunnyc7 closed this as completed Dec 1, 2017
@mdancho84
Copy link
Collaborator

Yahoo seems to be working now.

@sunnyc7
Copy link
Author

sunnyc7 commented Dec 1, 2017

Would it be a good idea to see if the API is working before calling tq_get() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants