Skip to content

Python Framework to make trades with the unofficial Robinhood API

License

Notifications You must be signed in to change notification settings

samueleishion/pyrh

 
 

Repository files navigation

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+

Please note that parts of this project maybe non-functional / under rapid development

  • A stable release is iminent

Quickstart

from pyrh import Robinhood

rh = Robinhood()
rh.login(username="YOUR_EMAIL", password="YOUR_PASSWORD")
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.portfolio)
  • 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

About

Python Framework to make trades with the unofficial Robinhood API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.6%
  • Jupyter Notebook 2.3%
  • Gherkin 0.1%