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

Inconsistent error messages when passing invalid tickers under default options #33

Open
josiahlund opened this issue Jul 11, 2021 · 0 comments

Comments

@josiahlund
Copy link

First of all, thank you for putting this API together. It's been fun becoming familiar with it. My use case for this is a bot where people are passing requests and some of them have been garbage requests for stock tickers that do not actually exist. The errors thrown by wallstreet.Stock have varied which surprised me. For example, Stock("XRP") will raise a KeyError, where Stock("RNDR") will raise an IndexError. I went to look into the code for Stock and found that no matter what I passed as an input, I could not trigger the LookupError on line 136 of wallstreet.py. It appears that the yahoo API returns status_code 200 for any successful request even if the stock does not exist.

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

1 participant