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

README Quick Start Example code doesn't work #301

Closed RobertAgee closed 1 year ago

RobertAgee commented 1 year ago

Description

The example code in the README's Quick Start:

from pyrh import Robinhood

rh = Robinhood()
rh.login(username="YOUR_EMAIL", password="YOUR_PASSWORD")
rh.print_quote("AAPL")

returns a TypeError:

Traceback (most recent call last):
  File "C:\Users\xxx\xxx\xxx\main.py", line 8, in <module>
    rh = Robinhood()
TypeError: SessionManager.__init__() missing 2 required positional arguments: 'username' and 'password'

is corrected as:

from pyrh import Robinhood

rh = Robinhood(username="YOUR_EMAIL", password="YOUR_PASSWORD")
rh.login()
rh.print_quote("AAPL")

Will submit a pull request with the update.