stock-ticker-symbol
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Nasdaq Stock Ticker Symbols

Utility to lookup and validate NASDAQ Ticker Symbols

lookup takes a symbol and returns the company name if valid, otherwise it returns null.

search returns an array of results with tickers/names matching input or an empty array

searchTicker returns an array of results with tickers matching input or an empty array

searchName returns an array of results with names matching input or an empty array

Install

$ npm install stock-ticker-symbol

Usage

const stocks = require('stock-ticker-symbol');
 
stocks.lookup('AAPL'); // Apple Inc.;
 
stocks.lookup('ABCD'); // null;
 
stocks.search('apple');
// [ { name: 'Apple Hospitality REIT, Inc.', ticker: 'APLE' },
//   { name: 'Apple Inc.', ticker: 'AAPL' },
//   { name: 'Maui Land & Pineapple Company, Inc.', ticker: 'MLP' } ]
 
stocks.searchTicker('MSFT'); // [ { name: 'Microsoft Corporation', ticker: 'MSFT' } ]
 
stocks.searchTicker('OMG'); // []
 
stocks.searchName('alphabet'); // [ { name: 'Alphabet Inc.', ticker: 'GOOGL' } ]

License

MIT

Package Sidebar

Install

npm i stock-ticker-symbol

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

882 kB

Total Files

8

Last publish

Collaborators

  • danielkhoo