How to export and download Robinhood transaction data

Last updated on October 17, 2020 by Dan Nanni

Question: I have been using Robinhood stock trading platform, and I would like to export all the transaction records from my Robinhood account and download them as a spreadsheet file for accounting purposes. Is there an easy way to export and save Robinhood transaction data in a CSV file, preferably from the Linux command line?

As a stock trading mobile app targeted for millennials, Robinhood revolutionizes the way stock trades are done. With its 100% commission-free trading, Robinhood makes stock trading something that average people like us can easily do for fun. While Robinhood is getting maturer with more advanced features like instant deposits and after-hour trading, it is still lacking in useful features like data export.

The ability to download historical transaction data from Robinhood is a highly useful feature for various reasons (e.g., when calculating your portfolio's return or filing your tax return). However, Robinhood does not officially support data export feature as of yet.

In this tutorial let's find out how to export Robinhood transactions to a spreadsheet file from the Linux command line. While this tutorial is written for Linux environment, it should be applicable on any operating system platform as long as you can run Python.

The Robinhood data export tool presented in this tutorial is called Robinhood-for-Google-Finance, which exports Robinhood trade data to a CSV file by using Robinhood APIs. This tool works on Python 2.7+ and 3.5+.

You can install this Robinhood export tool by following these simple steps.

Install Robinhood Data Export Tool

First, install git and pip in your Linux environment.

Next, install the tool along with its dependent Python modules as follows.

$ git clone https://github.com/briansrls/Robinhood-for-Google-Finance.git
$ cd Robinhood-for-Google-Finance/
$ sudo pip install -r requirements.txt 

Download Robinhood Transaction Data

After installation, you can initiate the Robinhood data export process by simply running:

$ python gf-export.py

You will be asked to enter your Robinhood username and password. As you can verify from its Python source code, this Python tool does not send your login credential anywhere but the official Robinhood API endpoint, so don't worry about entering your credential here.

After successful data export, your transaction data will be stored in robinhood.csv.

The exported CSV file is formatted as follows.

Date purchased,Commission,Purchase price per share,Shares,Transaction type,Symbol,
2015-08-20T12:21:48.833890Z,0.00,26.55000000,30.00000,buy,XYZ,
2015-08-20T12:31:52.836129Z,0.00,154.00000000,5.00000,buy,FAKE,
2015-08-20T12:37:04.790341Z,0.00,104.00000000,5.00000,buy,ABC,
2015-08-20T13:49:01.425933Z,0.00,122.91990000,5.00000,buy,DIS,
2015-08-20T13:56:54.648714Z,0.00,62.00000000,5.00000,buy,DEL,
2015-08-20T13:58:31.913929Z,0.00,213.00000000,5.00000,buy,FC,
2015-08-20T15:24:48.325668Z,0.00,82.00000000,2.00000,buy,TTT,
2015-08-20T19:41:48.406801Z,0.00,20.00000000,5.00000,buy,JO,
2015-08-20T19:43:39.375537Z,0.00,56.10000000,10.00000,buy,TOU,

Once exported, the CSV file can easily be imported into other stock market software like JStock or online portfolio management solutions such as Google Finance. Another useful Linux tool for stock traders is mop which allows you to monitor stock quotes simply from the command line.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean