New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

robinhood-node

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

robinhood-node

Trade stocks for free with simple to use library.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Robinhood node

Trade stocks for free with simple to use library.

Install

yarn add robinhood-node

Use

const RH = require('robinhood-node');
const rh = new RH({ user: 'RH user', password: 'RH password' });
// get account
const account = new rh.Account();
console.log(await account.user);;
// get stock quote
const stock = new rh.Stock('AMZN');
console.log(await stock.quote);
const orderResponse = await stock.marketOrder('buy', 1);
// check order and cancel
const order = new rh.Order(orderResponse.id);
console.log(order.status());
order.cancel();

Interface

Each class can be initiated from a robinhood-node instance.

RobinhoodNode

This is the main class to use. You can use it in anonymous mode. Some actions like selling/buying will require to login as a Robinhood user. There are 2 ways to login into the library:

user & password (&mfa key):
new RH({ user: 'your RH email', password: 'your RH password', mfa: 12345 });

mfa is optional and required only if your settings on Robinhood require it. In order to get the mfa try to leave it empty and then you should get the code on your first attempt.

token:
new RH({ token: 'your RH token' });

Once you login with username&password youu should get a token in reponse. this token can be used to access RH API from now on.

Stock

constructor(symbols) - symbols of stocks seperated by comma.
quote - get latest quote for symbol(s).
marketOrder(orderType, quantity, extraParams = {}) - orderType - buy or sell.
limitOrder(orderType, quantity, price, extraParams = {}) orderType - buy or sell.

Order

constructor(id) - optional order id.
status(id) - get order status. order id is optional (can be set up when initiated).
cancel(id) - cancel an order. order id is optional (can be set up when initiated).
recent - get recent orders.
static place(params) - manually place an order. a better use will be to interact with Stock class in order to place an order.

Account

constructor()
positions
accounts
user
basicInfo
investment

FAQs

Package last updated on 08 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc