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.
- RobinhoodWebApi
Class representing the RobinhoodWepApi object for interacting with the API.
This documentation is not exhaustive and will be added to periodically.
Class representing the RobinhoodWepApi object for interacting with the API.
Kind: global class
- RobinhoodWebApi
- new RobinhoodWebApi(opts)
- .login() ⇒
Promise.<string>
- .user() ⇒
Promise.<object>
- .orders() ⇒
Promise.<array>
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. |
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:
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:
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:
- Patrick W. Ackerman (@pwackerman)
- Alejandro U. Alvarez (@aurbano)
- Wei-Sheng Su (@ted7726)
- Alex Ryan (@ialexryan)
- Dustin Moore (@dustinmoorenet)
- Ben Van Treese (@vantreeseba)
- Jason Truluck (@jasontruluck)
- Justin Keller (@nodesocket)
- Chris Busse (@busse)
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.