PWAckerman / robinhood-node

:chart_with_upwards_trend: NodeJS client for the Robinhood Trading API

Home Page:http://urbanoalvarez.es/robinhood-node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Robinhood API NodeJS Wrapper

Forked And Extended By: Patrick W. Ackerman Original Author: Alejandro U. Alvarez License: AGPLv3 - See LICENSE file for more details

This is a fork of Alejandro A. Alvarez's project to make trades with the private Robinhood API. I have promisified many of the methods (using the Q library) to avoid race conditions with some of the asynchronous callbacks in the original. In addition, much of the code has been altered to use ES6 WeakMaps for private variables, rather than the simply preceding underscores to denote intended data hiding. I have also added some additional endpoints that were not covered in the original library.

As with the original, using this API is not encouraged, since it's not officially available and it has been reverse engineered. See this blog post for more information on Alejandro A. Alvarez's original API wrapper library.

It is Alejandro's opinion after having read the Robinhood Terms of Service Robinhood's Terms and Conditions that interacting with their servers using the API is not prohibited.

Alejandro's original framework was inspired by a deprecated Python framework originally developed by @Rohanpai.

Classes

RobinhoodWebApi

Class representing the RobinhoodWepApi object for interacting with the API.

RobinhoodWebApi

This documentation is not exhaustive and will be added to periodically.

Class representing the RobinhoodWepApi object for interacting with the API.

Kind: global class

new RobinhoodWebApi(opts)

Create an instance of the class. The constructor sets headers, endpoints, and private variables.

Param Type Description
opts object an object with username and password fields.

robinhoodWebApi.login() ⇒ Promise.<string>

Logs the user into Robinhood based on the provided details in the constructor, and stores that value as the 'session' within the object (only one session at a time per RobinhoodWebApi instance). Returns a Promise.

Kind: instance method of RobinhoodWebApi Returns: Promise.<string> - token Promise:

robinhoodWebApi.user() ⇒ Promise.<object>

Can only be called once a user has been logged in. Gathers the details about a specific user as stored by the Robinhood API. Returns a promise.

Kind: instance method of RobinhoodWebApi Returns: Promise.<object> - user details Promise:

robinhoodWebApi.orders() ⇒ Promise.<array>

Gathers the orders that are currently in place for the selected user. Returns a Promise.

Kind: instance method of RobinhoodWebApi Returns: Promise.<array> - order details Promise:

This Fork Managed By

Original Contributors


Like the original, this framework is still in a very alpha version and will likely change, so production usage is completely discouraged.

Just like Alejandro, I am not affiliated in any way with Robinhood Financial LLC. No harm or disruption towards their service is inteded by providing this library.

About

:chart_with_upwards_trend: NodeJS client for the Robinhood Trading API

http://urbanoalvarez.es/robinhood-node

License:GNU Affero General Public License v3.0


Languages

Language:JavaScript 100.0%