/pyrh

Python Framework to make trades with the unofficial Robinhood API

Primary LanguagePythonMIT LicenseMIT

robinhood-logo

pyrh - Unofficial Robinhood API

build PyPI - Downloads GitHub Code style: black Gitter

Python Framework to make trades with Unofficial Robinhood API. Supports Python 3.6+

Quickstart

from pyrh import Robinhood

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

How To Install:

pip install pyrh

Current Features

  • Placing buy orders (Robinhood.place_buy_order)
  • Placing sell order (Robinhood.place_sell_order)
  • Fetch and cancel orders (Robinhood.order_history and Robinhood.cancel_order)
  • Quote information (Robinhood.quote_data)
  • User portfolio data (Robinhood.portfolios)
  • User positions data (Robinhood.positions)
  • More coming soon
  • Install jupyter .. code-block:

    $ python --version # python 3.3+ for venv functionality
    Python 3.7.6
    $ python -m venv pyrh_env
    $ source pyrh_env/bin/activate
    (pyrh_env) $ pip install pyrh
    (pyrh_env) $ pip install jupyter
    (pyrh_env) $ jupyter notebook
    

Then navigate to the example file linked above and run it.

Data returned

  • Quote data
    • Ask Price
    • Ask Size
    • Bid Price
    • Bid Size
    • Last trade price
    • Previous close
    • Previous close date
    • Adjusted previous close
    • Trading halted
    • Updated at
    • Historical Price
  • User portfolio data
    • Adjusted equity previous close
    • Equity
    • Equity previous close
    • Excess margin
    • Extended hours equity
    • Extended hours market value
    • Last core equity
    • Last core market value
    • Market value
    • Order history
    • Dividend history
  • User positions data
    • Securities owned
  • News

Related