robinhood-unofficial / pyrh

Python Framework to make trades with the unofficial Robinhood API
https://pyrh.readthedocs.io/en/latest/
MIT License
1.78k stars 603 forks source link

get_popularity returns key exception 'num_open_positions' #292

Closed michael-yip closed 2 years ago

michael-yip commented 2 years ago

Checklist

Description

The function get_popularity returns key exception 'num_open_positions' due to the /popularity/ endpoint call is not recognised by RH.

Example:

API endpoint: https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/popularity/ RH Response:

{"detail":"Not found."}

Steps/Code to Reproduce

get_popularity('AAPL')

Results

Exception - 'num_open_positions'

Versions

>>> import platform; print(platform.platform())
macOS-10.16-x86_64-i386-64bit
>>> import sys; print("Python", sys.version)
Python 3.8.6 (default, Oct  8 2020, 14:06:32) 
[Clang 12.0.0 (clang-1200.0.32.2)]
>>> import pyrh; print("pyrh", pyrh.__version__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'pyrh' has no attribute '__version__'
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.