wallstreet
wallstreet copied to clipboard
Inconsistent error messages when passing invalid tickers under default options
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.