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

Executin Error #11

Open
rsmileyc opened this issue Sep 11, 2017 · 9 comments
Open

Executin Error #11

rsmileyc opened this issue Sep 11, 2017 · 9 comments

Comments

@rsmileyc
Copy link

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?

@mcdallas
Copy link
Owner

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.

@plucena24
Copy link

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.

@rsmileyc
Copy link
Author

The companies are all in Google Finance (AMZN, BA, GOGGL, IBB, ISRG, PCLN, SPY, and TSLA).

@mcdallas
Copy link
Owner

So apparently the endpoint we've been using has been discontinued. I made a change to use the one @plucena24 suggested.

@rsmileyc
Copy link
Author

Can someone tell me how to get Wallstreet working again?

@mcdallas
Copy link
Owner

@rsmileyc try
pip install --upgrade git+https://github.com/mcdallas/wallstreet.git

@rsmileyc
Copy link
Author

rsmileyc commented Oct 2, 2017

Try tt. Works like a champ. Thanks for your help.

@dorian821
Copy link

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

@swappro
Copy link

swappro commented Mar 4, 2019

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',...........]

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

5 participants