Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

robinhood-api

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

robinhood-api - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

20

api/calls.js

@@ -93,2 +93,22 @@ module.exports = {

},
getPortfolio: {
desription: 'Get the user\'s portfolio by account ID',
path: '/portfolios/%account_number%',
fields: {
account_number: {
required: true
}
},
method: 'GET'
},
getHistoricals: {
description: 'Get the user\'s portfolio historicals',
path: '/portfolios/historicals/%account_number%',
fields: {
account_number: {
required: true
}
},
method: 'GET'
},
'getOrder': {

@@ -95,0 +115,0 @@ description: 'Get an order via the order_id parameter.',

6

index.js

@@ -28,2 +28,4 @@ "use strict";

let path = null;
try{

@@ -41,3 +43,3 @@ _.each(call.fields, function(options, field){

if(call.path.includes('%' + field + '%')){
call.path = call.path.replace('%' + field + '%', opts[field]);
path = call.path.replace('%' + field + '%', opts[field]);
delete opts[field];

@@ -47,3 +49,3 @@ }

let res = await self.request(call.method, call.path, opts);
let res = await self.request(call.method, (path != null) ? path : call.path, opts);

@@ -50,0 +52,0 @@ return res;

{
"name": "robinhood-api",
"version": "1.0.5",
"version": "1.0.6",
"description": "Robinhood API Wrapper",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -84,2 +84,10 @@ # Overview

* nonzero - Required: false (Valid Values: true,false)
## robinhood.getPortfolio(opts)
undefined
### Options
* account_number - Required: true
## robinhood.getHistoricals(opts)
Get the user's portfolio historicals
### Options
* account_number - Required: true
## robinhood.getOrder(opts)

@@ -86,0 +94,0 @@ Get an order via the order_id parameter.

@@ -9,2 +9,7 @@ const RobinHood = require('./index.js');

//let test = await rh.getAccounts();
test = await rh.getQuote({symbol: 'HRL'});
console.log(test);
test = await rh.getQuote({symbol: 'JNJ'});
console.log(test);
console.log('Logged in!');

@@ -11,0 +16,0 @@ }catch(e){

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