robinhood-python

prepare robinhood 2factor auth

  1. login robinhood

  2. account >> setting >> security and privacy >> two-factor authentication click

  3. click update

  4. click "i can't scan the code

  5. copy code and save it (APP-KEY)

  6. write code below

    pip install robin-stocks
    pip install pyotp
    vi robin.py
    import robin_stocks.robinhood as robin
    import pyotp
    login = robin.login("YOUR-EMAIL","YOUR-PASSWORD")
    totp = pyotp.TOTP("APP-KEY").now()
    print("Current OTP",totp)
  7. run code then you can see OTP put into robinhood

    python3 robin.py
  8. copy and save backup code for future

  9. let's create secret file

    vi  ./totp.txt
    APP-KEY
    USER-EMAIL
    USER-PASSWORD

let's create python script

run and check output

Get Qoute / Buy / Sell

Caution

You can only daytrade a limited number of times. Please note that

Last updated

Was this helpful?