@lutra-labs/stock-exchange-symbol-info
v1.2.0
Published
Fetch and aggregate up to date lists of stocks on the NYSE, NASDAQ and AMEX, and use it as an API.
Downloads
21
Maintainers
Readme
Stock Exchange Symbols
📈 Fetch and get details of symbols from nasdaq, nyse and amex.
Usage
API
The API is exported as a module. You can access it normally using require as:
const {build, all, symbol} = require('@lutra-labs/stock-exchange-symbol-info');Note that all the API methods return promises (They are async functions)!
| API | Parameters Expected | Description | | ------------- | ------------- | ------------- | | build | - | Pull data from NASDAQ and store them for later use | | all | - | Return all the available data as an object of shape: {headers: {...data about the shape of symbol data}, dict: {[symbol: {...data}], ...}} | | symbol | symbol - ticker symbol to get data for | Returns data for the particular symbol |
At the time of publishing, the headers look like:
{
"symbol":"Symbol",
"name":"Name",
"lastsale":"Last Sale",
"netchange":"Net Change",
"pctchange":"% Change",
"marketCap":"Market Cap",
"country":"Country",
"ipoyear":"IPO Year",
"volume":"Volume",
"sector":"Sector",
"industry":"Industry",
"url":"Url"
}Initializing the Stock Data
You can either initialize the stock data manually or through an API.
- Manual Method: Run the build script from bin using
node ./bin/build.jsor usingnpm build. - API: await on the
buildAPI method.s
LICENSE
MIT
Authors
- Vaishnav S Menon
- Heavily modified from Joe McCann's original repository
