pydata / pandas-datareader

Extract data from a wide range of Internet sources into a pandas DataFrame.
https://pydata.github.io/pandas-datareader/stable/index.html
Other
2.91k stars 681 forks source link

Yahoo Options has been immediately deprecated due to large breaks in the API #588

Open phyllotaxis1 opened 5 years ago

phyllotaxis1 commented 5 years ago

def get_surf(ticker):

q = Options(ticker, 'yahoo').get_all_data()

Does anyone know why I get the error message, "_pandasdatareader.exceptions.ImmediateDeprecationError: Yahoo Options has been immediately deprecated due to large breaks in the API without the introduction of a stable replacement. Pull Requests to re-enable these data connectors are welcome." with this chunk of code?

bashtage commented 5 years ago

Are you using 0.7.0?

phyllotaxis1 commented 5 years ago

yeah

phyllotaxis1 commented 5 years ago

it's the options information that didn't work... i was able to get the stock data

chengsu99 commented 5 years ago

Me too. How to deal with it? ----> 1 aapl = Options('aapl')

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas_datareader/data.py in Options(symbol, data_source, session) 413 data_source = "yahoo" 414 if data_source == "yahoo": --> 415 raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Yahoo Options')) 416 return YahooOptions(symbol, session=session) 417 elif data_source == "google":

ImmediateDeprecationError: Yahoo Options has been immediately deprecated due to large breaks in the API without the introduction of a stable replacement. Pull Requests to re-enable these data connectors are welcome.

1ekrem commented 5 years ago

Any update in this? Still cannot retrieve the options data

Yahoo Options has been immediately deprecated due to large breaks in the API without the introduction of a stable replacement. Pull Requests to re-enable these data connectors are welcome.

from pandas_datareader.data import Options
fb_options = Options('TSLA', 'yahoo')
options_df = fb_options.get_options_data(expiry=fb_options.expiry_dates[0])
print(options_df.tail())
csfreebird commented 5 years ago

I ran into the same problem.

joshuap2613 commented 4 years ago

any update on this issue? It has not yet been fixed

bashtage commented 4 years ago

@raysalem PRs that work around the large change in yahoo's undocumented api are welcome. There was no point in shipping a completely broken connector.

zer0nop commented 4 years ago

this seems to be working as of today (Apr-09-2020).

there is still a deprecation warning for some reason that prevents it from being used through the main Options class

raise ImmediateDeprecationError(DEP_ERROR_MSG.format("Yahoo Options"))
kesava-18bil commented 4 years ago

it's the options information that didn't work... i was able to get the stock data

Were you able to get the options data? I'm facing the same issue. Able to get stock data but not options data.

zer0nop commented 4 years ago

It is still working for me, I had to work around the wrapper of the Yahoo call. Here is the code that is still working, I hope this helps!

from pandas_datareader.yahoo.options import Options as YahooOptions
underlying_symbol = 'SPY'
options_obj = YahooOptions(underlying_symbol)
options_frame_live = options_obj.get_all_data()

Also my pandas_datareader version is 0.8.1

import pandas_datareader
print(pandas_datareader.__version__)
0.8.1

Good luck trading! :)

kesava-18bil commented 4 years ago

It is still working for me, I had to work around the wrapper of the Yahoo call. Here is the code that is still working, I hope this helps!

from pandas_datareader.yahoo.options import Options as YahooOptions
underlying_symbol = 'SPY'
options_obj = YahooOptions(underlying_symbol)
options_frame_live = options_obj.get_all_data()

Also my pandas_datareader version is 0.8.1

import pandas_datareader
print(pandas_datareader.__version__)
0.8.1

Good luck trading! :)

Great! It works well.

Appreciate your fast response and thanks for your help!