jmfernandes / robin_stocks

This is a library to use with Robinhood Financial App. It currently supports trading crypto-currencies, options, and stocks. In addition, it can be used to get real time ticker information, assess the performance of your portfolio, and can also get tax documents, total dividends paid, and more. More info at
http://www.robin-stocks.com
MIT License
1.69k stars 459 forks source link

421 Client Error: Unknown Status Code for url: https://api.robinhood.com/options/instruments/ #294

Closed julianwagle closed 1 year ago

julianwagle commented 3 years ago

I'm getting a lot on 421 errors for requests for option urls - they started very recently and I had never gotten them before. They seem to only happen for option related urls. for example, here are the common ones I keep getting:

rh.options.get_chains(ticker) returns: 421 Client Error: Unknown Status Code for url: https://api.robinhood.com/options/instruments/bcbf94fc-b5a5-4b00-90e0-80da0eeb400e/

rh.options.find_options_by_expiration(ticker, exp, "put", info=None) returns: 421 Client Error: Unknown Status Code for url: https://api.robinhood.com/options/instruments/?chain_id=d47ef399-7da3-4365-8dd9-e4eaf65cb914&chain_symbol=AEO&state=active&expiration_dates=2021-07-09&type=put

I'm fully authenticated and all the non-option related urls are working just fine.

even some option related urls still work, for example:

rh.options.get_option_market_data()

is returning data perfectly fine.

ssmanji89 commented 3 years ago

noticed this as well and the best I can tell is 'too many requests' by chance today