Skip to content

HTTP Error 401 when called on large amount of tickers #360

Closed
@rpfreitasxyz

Description

@rpfreitasxyz

Hi, Thank you very much for the fix and comments here. getSymbols.yahoo() now works for me, but I have a different problem. When I run getSymbols.yahoo() successfully in a loop for more than about 300-400 tickers, I started to get "HTTP error 401" for all following downloads. There are some failed downloads of invalid tickers in between though. Does anyone know what the issue is? Maybe I have the same problem with @rhamo.

Here is an example of the subsequent download:

> getSymbols.yahoo("AAPL",from="2022-04-27",to="2022-04-29",auto.assign=FALSE)
Warning: AAPL download failed; trying again.
Warning: Unable to import "AAPL".
AAPL download failed after two attempts. Error message:
HTTP error 401.
[1] "Error in open.connection(file, \"rt\") : HTTP error 401.\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in open.connection(file, "rt"): HTTP error 401.>

Thank you!

Originally posted by @edwinhung in #358 (comment)

Thank you all for the quick fix in regards to tq_get()! However, I believe that this new issue has arisen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions