An unofficial (and very alpha stage) command line client for Robinhood, prototyped in php
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead of DylanEHolland:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.


An unofficial (and very alpha stage) command line client for Robinhood Stock Trading

The Robinhood Command line is an unofficial command line app that allows the buying and trading of stocks via the Robinhood API, as well as the ability to view your portfolio (and watched securities soon!) along with the 100 most popular stocks and details of a given stock.

It can be used in shell scripts ala

    for I in `rhcli --popular | awk '{print $2}`; 
        rhcli -s $I; 

Or if you're the YOLO type

    for I in `rhcli --popular | awk '{print $2}`; 
        rhcli --buy $I market 1; 

Feel free to issue a bug report for feature requests or contribute, I'm not against rewriting this in a more elegant language like python or java and likely will once I have the api calls down and the interface the way I want it.


needs php7, php-curl and php-json

Right now the Makefile will work on linux/bsd assuming you have php7 with curl and json enabled, once that's done just run

`make install` as root


`make uninstall` as root


You should be able to get it running on windows as well you'll just have to either edit the Makefile or manually run the equivalent commands (and then edit into a .bat or .ps1 file (I'll be doing this soon as I have a windows box I just have to find the time.)

Baic usage:

  • use [--verbose|-v] to see more information

  • you can pass [-g|--show_graph] to see the alpha stage graph (it likely won't work great if at all at this time)

  • rhcli [--security|-s] [symbol name] - Get latest information on a security

  • rhcli [--popular] - Return a list of 100 most popular securities

  • rhcli [--login|-l] [username] [password] - Login (afterwards rhcli without arguments dumps your basic user profile) Example: rhcli --login some_password

  • rhcli [--logout] - Log user out, right now they are autologged out every 15 minutes regardless

  • rhcli [--portfolio|-p] - List current portfolio, instead of just the current no argument way (you can add -g before portfolio to see a graph that doesn't work yet :P)

  • rhcli [--buy|-b] [symbol] [limit|market] [number of shares] [limit price] - Buy shares, allow for limits

  • rhcli [--sell|-se] [symbol] [limit|market] [number of shares] [limit price] - Sell shares, allow for limits

note that the login will be changed to interactive soon, and probably a config file will be added where you can set your user/pass that way if you don't want to have to keep logging in every 15 minues


  • rhcli [--watch|-f] [symbol name] - Add a symbol to the watch list

  • rhcli [--unwatch|-uf] [symbol name] - Unwatch securit(y/ies)

  • rhcli [--watching|-w] - List watched securities