Open rsmileyc opened 7 years ago
Nothing changed in the library, could you check if the company you are interested in appears in Google Finance? If not you can try to pass the source='yahoo' parameter to get data from Yahoo Finance instead.
This seems to be due to a change in Google API URL. The hardcoded URL in Stock and Option class is referencing a URL yielding 404s. The new URL removed the "info" portion, and returns back json encoed data.
The companies are all in Google Finance (AMZN, BA, GOGGL, IBB, ISRG, PCLN, SPY, and TSLA).
So apparently the endpoint we've been using has been discontinued. I made a change to use the one @plucena24 suggested.
Can someone tell me how to get Wallstreet working again?
@rsmileyc try
pip install --upgrade git+https://github.com/mcdallas/wallstreet.git
Try tt. Works like a champ. Thanks for your help.
Really interested in the wallstreet package, however, it doesn't seem to work at all for options. Just re-installed from your git and still getting the error below:
In [1]: import wallstreet as ws
In [2]: g = ws.Call('GOOG')
---------------------------------------------------------------------------
LookupError Traceback (most recent call last)
<ipython-input-2-1e2451af9078> in <module>()
----> 1 g = ws.Call('GOOG')
C:\Users\arain\Anaconda3\lib\site-packages\wallstreet\wallstreet.py in __init__(self, quote, d, m, y, strike, strict, source)
272 quote = quote.upper()
273 kw = {'d': d, 'm': m, 'y': y, 'strict': strict, 'source': source}
--> 274 super().__init__(quote, self.__class__.Option_type, **kw)
275
276 self.T = (self._expiration - date.today()).days/365
C:\Users\arain\Anaconda3\lib\site-packages\wallstreet\wallstreet.py in __init__(self, quote, opt_type, d, m, y, strict, source)
159
160 self.source = source.lower()
--> 161 self.underlying = Stock(quote, source=self.source)
162
163 if self.source == 'google':
C:\Users\arain\Anaconda3\lib\site-packages\wallstreet\wallstreet.py in __init__(self, quote, exchange, source)
64 self.source = source.lower()
65 if self.source == 'google':
---> 66 self._google(quote, exchange)
67 elif self.source == 'yahoo':
68 self._yahoo(quote, exchange)
C:\Users\arain\Anaconda3\lib\site-packages\wallstreet\wallstreet.py in _google(self, quote, exchange)
112
113 if r.status_code == 400 or self.ticker != query.split(':')[-1]:
--> 114 raise LookupError('Ticker symbol not found. Try adding the exchange parameter')
115 else:
116 r.raise_for_status()
LookupError: Ticker symbol not found. Try adding the exchange parameter
why is it that strikes are returned in increments of 0.5 while skipping the whole numbers. for instance the current price of SPY is: 277.31 and the returned strikes are as follows: g = Call('SPY', d=15, m=3, y=2019, strike=280, source='yahoo') g.strikes (188, 193, 202, 204, 260.5, 261.5, 262.5, 263.5,... 275.5, 276.5, 277.5, 278.5, 279.5, 280.5, 282.5, 287.5, 296, 297, 298, 299) Even worse expirations only starting one month out: g.expirations ['04-03-2019', '06-03-2019', '08-03-2019', '11-03-2019', '13-03-2019', '15-03-2019', '18-03-2019', '20-03-019', '22-03-2019', '25-03-2019', '27-03-2019', '29-03-2019',...........]
I have been using Wallstreet successful for the last few months. This weekend, I started getting the following error message: LookupError('Ticker symbol not found. Try adding the exchange parameter') LookupError: Ticker symbol not found. Try adding the exchange parameter. I haven't changed anything in my program including the stock symbols. Has something Wallstreet changed?