pyrh: quote_data fails with InvalidTickerSymbol - quotes endpoint requires auth token now
GET requests for quotes now require that you pass your access token.
For anyone looking for a quick fix to the problem, in your quote_data and quotes_data functions in Robinhood.py, replace:
req = requests.get(url, timeout=15)
with:
req = requests.get(url, headers=self.headers, timeout=15)
which will pass your auth token with your quotes request.
For any future PR, make sure to change the InvalidTickerSymbol() raise, because it’s not really accurate.
s/o to https://github.com/Ladinn/algotrader/issues/11 for the idea!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 15 (1 by maintainers)
Thank you for your work, @trevorwelch. I’m reviewing the open PRs today