Robinhood CLI Tool for Quick Stock Exits + Multi-Factor Login Support

Screen Shot 2019-02-19 at 4.40.05 PM

What Robinhood is Missing

I’ve really enjoyed trading with Robinhood (NO FEES) these last few months, but viewing some metrics in their web UI and mobile app take too many clicks. For one, determining my percent return requires three clicks for each Stock position. This is too slow when you want to be quickly informed on when to make quick exits.

The CLI Tool

Preferably, I wanted a quick and dirty CLI tool in Python to crunch these numbers for me. I ended up finding a great open source Python framework to interact with Robinhood’s backend API and decided to make some tweaks to it to support:

  1. Streamlined Multi-factor Auth Login
  2. Improved Security with credentials as environment variables
  3. Calculate and display percent return on each position

You can find my working Fork here: https://github.com/parkergordonio/Robinhood


Running the Tool

Executing Script + Login Prompt + MFA Code: 

(I have a bash/zsh alias here “robin” pointing to the script get-metrics.sh)Screen Shot 2019-02-19 at 3.57.12 PM

Metrics Output:

By sorting each position on this newly generated percent return field, your eyes are quickly drawn to the positions that you may want to exit soon.

Screen Shot 2019-02-19 at 3.33.58 PM

This is what it’s all about!

Happy trading!


Note: There are plans to have this work merged back into source repo in some fashion.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s