mcdallas / wallstreet

Real time stock and option data.
MIT License
1.38k stars 203 forks source link

Traceback on import #14

Closed joshs-gh closed 4 years ago

joshs-gh commented 6 years ago

Getting this:

from wallstreet import Stock, Call, Put Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/wallstreet/init.py", line 1, in from wallstreet.wallstreet import Stock, Call, Put File "/Library/Python/2.7/site-packages/wallstreet/wallstreet.py", line 196 raise ValueError('Possible expiration dates for this option are:', self.expirations) from None ^ SyntaxError: invalid syntax

Running:

sys.version '2.7.10 (default, Oct 23 2015, 19:19:21) \n[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]'

on a mac. Is 2.7 not supported? Thx.

mcdallas commented 6 years ago

Yes it is Python 3 only

joshs-gh commented 6 years ago

Thx @mcdallas! I'm in via py3. But when I try the test code I get:

Ticker symbol not found. Try adding the exchange parameter.

s=Stock('GOOG', exchange="NASDAQ")

yields the same. Does this only work during market hours?

mcdallas commented 6 years ago

@jsiegel-cn if you have the version that is currently on pip please do this:

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

There has been some changes with GF Api and aren't up on pip yet