Skip to content

thomasmarcel/robinhood-api

Repository files navigation

Robinhood::Api

Gem Version Build Status Coverage Status Maintainability Test Coverage codecov Dependency Status Open Source Helpers

Get the most of Robinhood: accounts, positions, portfolio, buy and sell securities, etc.

GitHub Repository
rubygems.org page

Usage

  1. Set the ROBINHOOD_USERNAME and ROBINHOOD_PASSWORD in your environment
    e.g. in your ~/.bash_profile or ~/.bashrc file:
export ROBINHOOD_USERNAME="aaa"
export ROBINHOOD_PASSWORD="bbb"
  1. In you rb file:
robinhood = Robinhood::Api,new  

robinhood.login(
  ENV['ROBINHOOD_USERNAME'],
  ENV['ROBINHOOD_PASSWORD']
)

# Getting the list of orders made by the user
@orders = robinhood.orders

Methods

General

  • login
  • accounts
  • investment_profile
  • portfolio

Orders

  • orders
  • cancel_order
  • buy
  • limit_buy
  • sell
  • limit_sell
  • stop_loss_sell

Quotes

  • quote

Positions and Instruments

  • instruments
  • position

Installation

Add this line to your application's Gemfile:

gem 'robinhood-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install robinhood-api

Tests

Run tests

Execute the following command:

$ bundle exec rake test

Coverage

codecov sunburst graph codecov icicle graph codecov grid graph codecov commits graph

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.