npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

robinhood-simple

v2.1.5

Published

A simple module to interact with the Robinhood API; incl. promise support, readable code, more

Readme

A Simple NodeJS Robinhood Api

npm npm

Overview

A simple nodejs module to interact with the private Robinhood API. The API has been reverse engineered; no official nodejs api for robinhood exists. FYI: Robinhood's Terms and Conditions.

Origin

This repository is based off of robinhood-node by aurbano. It was generated as a new repository rather than a fork because of the massive, backwards-incompatible, changes that were created in order to:

  • "promisify" the api
  • support natural object instantiation
  • make errors more understandable
  • make error handling easier
  • make code more readable

and most importantly

  • keep it simple

Installation

$ npm install robinhood-simple --save

Authentication

To access most functionality one must use either the username and password of an active Robinhood account or a token from a previously authenticated Robinhood session. For example:


var credentials = {
    username: STRING,
    password: STRING
}
// -- or --
var credentials = {
    token: STRING
}

var Robinhood = require('robinhood-simple');
var robinhood = new Robinhood(credentials);
// robinhood is now ready to use!

After authenticating, you may now interact with the Robinhood API.

Table of Contents

API

These examples assume that the robinhood object has already been initialized as demonstrated above. Note, the robinhood module will automatically wait until authorization has completed before running any subsequent requests are made. In other words the following usage is supported:

var robinhood = new Robinhood(credentials);
robinhood.instruments("AAPL")
    .then((body)=>{/* magic */})

token()

This resolves with the token after the robinhood instance is authenticated.

robinhood.token()
    .then((token)=>{
        console.log(token) // don't share this! whoever has this can access your account.
    })

accounts()

robinhood.accounts()
    .then((body)=>{
        console.log(body)
    })

expire_token()

expire_token() enables a user to log out and terminate the robinhood session, de-authorizing a specific token.

robinhood.expire_token()
    .then(()=>{
        console.log("logged out of robinhood and expired the token")
    })

historicals()

var ticker = "AAPL";
var interval = "10minute"; // either `10minute` or `5minute`
var period = "day"; // either "day" or "week"
robinhood.historicals(ticker, interval, period)
    .then((body)=>{
        var historicals = body.historicals;
        console.log(historicals);
        /*
        [
          { begins_at: '2018-01-16T14:30:00Z',
            open_price: '245.3500',
            close_price: '245.5400',
            high_price: '246.0800',
            low_price: '245.2100',
            volume: 12701,
            session: 'reg',
            interpolated: false },
          { begins_at: '2018-01-16T14:40:00Z',
            open_price: '245.6096',
            close_price: '245.8100',
            high_price: '245.8400',
            low_price: '245.2400',
            volume: 8133,
            session: 'reg',
            interpolated: false },
          { begins_at: '2018-01-16T14:50:00Z',
            open_price: '245.7502',
            close_price: '245.9100',
            high_price: '246.0548',
            low_price: '245.5861',
            volume: 4569,
            session: 'reg',
            interpolated: false },
            ...
        ]
        */
    })

instruments(symbol)

instruments(...) is used to retreive detailed information about specific instruments (e.g., companies).

var ticker_symbol = "AAPL"; // use apple symbol for demo
robinhood.instruments(ticker_symbol)
    .then((body)=>{
        console.log(body);
        //    { previous: null,
        //      results:
        //       [ { min_tick_size: null,
        //           splits: 'https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/splits/',
        //           margin_initial_ratio: '0.5000',
        //           url: 'https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/',
        //           quote: 'https://api.robinhood.com/quotes/AAPL/',
        //           symbol: 'AAPL',
        //           bloomberg_unique: 'EQ0010169500001000',
        //           list_date: '1990-01-02',
        //           fundamentals: 'https://api.robinhood.com/fundamentals/AAPL/',
        //           state: 'active',
        //           day_trade_ratio: '0.2500',
        //           tradeable: true,
        //           maintenance_ratio: '0.2500',
        //           id: '450dfc6d-5510-4d40-abfb-f633b7d9be3e',
        //           market: 'https://api.robinhood.com/markets/XNAS/',
        //           name: 'Apple Inc. - Common Stock' } ],
        //      next: null }
    })

Contributors

From github.com/aurbano/robinhood-node:


Even though this should be obvious: I am not affiliated in any way with Robinhood Financial LLC. I don't mean any harm or disruption in their service by providing this. Furthermore, I believe they are working on an amazing product, and hope that by publishing this NodeJS framework their users can benefit in even more ways from working with them.