Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
robinhood-node
Advanced tools
Trade stocks for **FREE** with this simple to use NodeJS library. Yes, it's really free using [Robinhood](http://share.robinhood.com/sagivo) service and their [undocumented API](https://github.com/sanko/Robinhood). The motivation behind this tool is to ag
Trade stocks for FREE with this simple to use NodeJS library.
Yes, it's really free using Robinhood service and their undocumented API.
The motivation behind this tool is to aggregate functions based on logic and not necessary api domain.
yarn add robinhood-node
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.buy(1);
// check order and cancel
const order = new rh.Order(orderResponse.id);
console.log(order.status());
order.cancel();
Each class can be initiated from a robinhood-node instance.
In order to login you will need to have a Robinhood account. Use this link to open a free account.
Some of the calls (like stock quotes) can be used in anonymous mode.
In order to trade (sell/buy) you will require to login as a Robinhood user.
There are 2 ways to login into the library:
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.
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.
constructor(symbols)
- symbols of stocks seperated by comma.
quote
- get latest quote for symbol(s).
You can place orders directly from the stock class. For information about order types click here.
For a list of extra params available click here.
buy(quantity, extraParams = {})
sell(quantity, extraParams = {})
buyLimit(quantity, price, extraParams = {})
sellLimit(quantity, price, extraParams = {})
stopLossSell(quantity, stopPrice, extraParams = {})
stopLossBuy(quantity, stopPrice, extraParams = {})
stopLossSellLimit(quantity, stopPrice, sellPrice, extraParams = {})
stopLossBuyLimit(quantity, stopPrice, buyPrice, extraParams = {})
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.
constructor()
positions
accounts
user
basicInfo
investment
There are a lot of API calls that are still not implemented here. The important calls are. Any help or PR will be highly appriciated!
FAQs
Trade stocks for **FREE** with this simple to use NodeJS library. Yes, it's really free using [Robinhood](http://share.robinhood.com/sagivo) service and their [undocumented API](https://github.com/sanko/Robinhood). The motivation behind this tool is to ag
The npm package robinhood-node receives a total of 12 weekly downloads. As such, robinhood-node popularity was classified as not popular.
We found that robinhood-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.