xuy / pyrh

Python Framework to make trades with the unofficial Robinhood API

Home Page:https://pyrh.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.portfolios)
  • User positions data (Robinhood.positions)
  • More coming soon

Running example.ipynb

  • 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

https://pyrh.readthedocs.io/en/latest/

License:MIT License


Languages

Language:Python 96.8%Language:Jupyter Notebook 3.1%Language:Gherkin 0.0%