Pandas-datareader: Yahoo Options has been immediately deprecated due to large breaks in the API

Created on 7 Oct 2018  路  12Comments  路  Source: pydata/pandas-datareader

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?

Most helpful comment

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

All 12 comments

Are you using 0.7.0?

yeah

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

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.

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

I ran into the same problem.

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

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

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

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.

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

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Chandrak1907 picture Chandrak1907  路  4Comments

nithints picture nithints  路  7Comments

hmz123 picture hmz123  路  6Comments

allenwu25 picture allenwu25  路  9Comments

BajajAryan310 picture BajajAryan310  路  7Comments