Huge News!Announcing our $40M Series B led by Abstract Ventures.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 - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

core/Instrument.js

21

core/Account.js

@@ -35,3 +35,24 @@ const Request = require('./Request');

}
get watchlists() {
return Request.getPersonal('watchlists');
}
get defaultWatchlist() {
return Request.getPersonal('watchlists/Default');
}
get portfolios() {
return Request.getPersonal('portfolios');
}
async defaultPortfolio() {
if (!this.defaultPortfolioId) {
const portfolios = await this.portfolios;
this.defaultPortfolioId = portfolios.results[0].url.split('/').slice(-2)[0];
}
return Request.getPersonal(`portfolios/${this.defaultPortfolioId}`);
}
}
const instrumetSymbols = {};

8

core/Stock.js

@@ -19,10 +19,2 @@ const Order = require('./Order');

async instrument(symbol) {
symbol = symbol || this.symbols.split(',')[0];
if (!this.instruments[symbol]) {
this.instruments[symbol] = await Request.get('instruments', { symbol });
}
return this.instruments[symbol];
}
async makeOrder(params) {

@@ -29,0 +21,0 @@ const orderParams = await this.getOrderParams();

2

index.js

@@ -6,2 +6,3 @@ const Request = require('./core/Request');

const Order = require('./core/Order');
const Instrument = require('./core/Instrument');

@@ -13,2 +14,3 @@ module.exports = class RobinhoodNode {

get Order() { return Order };
get Instrument() { return Instrument };

@@ -15,0 +17,0 @@ constructor(params) {

{
"name": "robinhood-node",
"version": "1.0.2",
"version": "1.0.3",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -70,2 +70,7 @@ # Robinhood node ![robinhood-node](https://i.imgur.com/ev0Xv9d.jpg)

### Instrument
[`static all`](https://github.com/sanko/Robinhood/blob/master/Instrument.md#grab-a-list-of-all-instruments)
[`static valueById(id)`](https://github.com/sanko/Robinhood/blob/master/Instrument.md#gather-basic-instrument-info-by-id)
[`static valueBySymbol(symbol)`](https://github.com/sanko/Robinhood/blob/master/Instrument.md#gather-basic-instrument-info-by-symbol)
### Account

@@ -78,2 +83,5 @@ `constructor()`

[`investment`](https://github.com/sanko/Robinhood/blob/master/Account.md#gather-investment-profile-data-about-the-account-holder)
[`watchlists`](https://github.com/sanko/Robinhood/blob/master/Watchlist.md)
[`defaultWatchlist`](https://github.com/sanko/Robinhood/blob/master/Watchlist.md)
`portfolios`

@@ -80,0 +88,0 @@

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