2.0.3 • Published 1 year ago

@stonksjs/robinhood-collections v2.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
1 year ago

@stonksjs/robinhood-collections

Get the stock symbols for any Robinhood collection

npm (scoped)

Installation

npm install --save @stonksjs/robinhood-collections

Usage

const robinhoodCollections = require('@stonksjs/robinhood-collections');

// get all valid Robinhood collections
console.log(robinhoodCollections.collections); // [{ id: '100-most-popular', name: '100 Most Popular'}, ...]

const symbols = await robinhoodCollections.getCollection('reit'); // returns array of ticket symbols

API

@stonksjs/robinhood-collections : object

robinhoodCollections.collections : Array.<object>

An array of Robinhood collections, including the name and id

Kind: static property of @stonksjs/robinhood-collections

Example

[
  { id: '100-most-popular', name: '100 Most Popular' },
  { id: 'upcoming-earnings', name: 'Upcoming Earnings' },
  { id: 'new-on-robinhood', name: 'New On Robinhood' },
  { id: 'technology', name: 'Technology' },
  { id: 'oil-and-gas', name: 'Oil and Gas' },
  { id: 'finance', name: 'Finance' },
  { id: 'software-service', name: 'Software Service' },
  { id: 'energy', name: 'Energy' },
  { id: 'manufacturing', name: 'Manufacturing' },
  { id: 'consumer-product', name: 'Consumer Products' },
  { id: 'etf', name: 'ETF' },
  { id: 'video-game', name: 'Video Games' },
  { id: 'social-media', name: 'Social Media' },
  { id: 'health', name: 'Health' },
  { id: 'entertainment', name: 'Entertainment' },
  { id: 'internet', name: 'Internet' },
  { id: 'electronics', name: 'Electronics' },
  { id: 'semiconductor', name: 'Semiconductors' },
  { id: 'pharmaceutical', name: 'Pharmaceutical' },
  { id: 'retail', name: 'Retail' },
  { id: 'automotive', name: 'Automotive' },
  { id: 'reit', name: 'REIT' },
  { id: 'banking', name: 'Banking' },
  { id: 'food', name: 'Food' },
  { id: 'material', name: 'Materials' },
  { id: 'aerospace', name: 'Aerospace' },
];

robinhoodCollections.getCollection ⇒ Promise

Get the ticker symbols from a given Robinhood collection

Kind: static property of @stonksjs/robinhood-collections Returns: Promise - - array of ticket symbols from the collection Fulfil: object - company financial data Reject: Error

ParamTypeDescription
collectionstringthe id of a robinhood collection

Example

const robinhoodCollections = require('@stonksjs/robinhood-collections');
const symbols = await robinhoodCollections.getCollection('reit');
2.0.3

1 year ago

1.0.0

4 years ago