pandas-datareader icon indicating copy to clipboard operation
pandas-datareader copied to clipboard

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

Open phyllotaxis1 opened this issue 7 years ago • 12 comments

def get_surf(ticker):

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

Does anyone know why I get the error message, "pandas_datareader.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?

phyllotaxis1 avatar Oct 07 '18 16:10 phyllotaxis1

Are you using 0.7.0?

bashtage avatar Oct 07 '18 20:10 bashtage

yeah

phyllotaxis1 avatar Oct 07 '18 23:10 phyllotaxis1

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

phyllotaxis1 avatar Oct 08 '18 00:10 phyllotaxis1

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.

chengsu99 avatar Dec 19 '18 17:12 chengsu99

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())

1ekrem avatar Jan 27 '19 00:01 1ekrem

I ran into the same problem.

csfreebird avatar Feb 17 '19 06:02 csfreebird

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

joshuap2613 avatar Oct 14 '19 03:10 joshuap2613

@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.

bashtage avatar Dec 29 '19 16:12 bashtage

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"))

zer0nop avatar Apr 09 '20 20:04 zer0nop

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.

kesava-18bil avatar Jul 03 '20 12:07 kesava-18bil

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! :)

zer0nop avatar Jul 03 '20 20:07 zer0nop

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!

kesava-18bil avatar Jul 06 '20 15:07 kesava-18bil