1.0.8 • Published 6 months ago

@xmspix/stock-market-module v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

Stock Market Module

Downloads

Installing

npm i @xmspix/stock-market-module

Usage

import StockMarketModules from "@xmspix/stock-market-module";

// Get EOD data from nasdaq.com
StockMarketModules.nasdaq()
  .then((res) => console.log(res))
  .catch((error) => console.log(error));

// Get EOD data from otcmarkets.com
StockMarketModules.otc()
  .then((res) => console.log(res))
  .catch((error) => console.log(error));

// Get earnings from stocktwits.com
StockMarketModules.earnings()
  .then((res) => console.log(res))
  .catch((error) => console.log(error));

// Get news from yahoo.com
StockMarketModules.news("AAPL")
  .then((res) => console.log(res))
  .catch((error) => console.log(error));

// Get chart data from yahoo.com
StockMarketModules.chart({
  symbol: "AAPL",
  from: "2020-05-20",
  to: "2021-05-20",
})
  .then((res) => console.log(res))
  .catch((error) => console.log(error));

// Get real-time data from yahoo streamer
const symbols = ["AAPL", "MSFT"];
StockMarketModules.subscribe(symbols, (res, error) => {
  if (error) console.log(error);
  console.log(res);
});

// Get quoteSummary from yahoo.com
const modules = [
  "assetProfile",
  "incomeStatementHistory",
  "incomeStatementHistoryQuarterly",
  "balanceSheetHistory",
  "balanceSheetHistoryQuarterly",
  "cashflowStatementHistory",
  "cashflowStatementHistoryQuarterly",
  "defaultKeyStatistics",
  "financialData",
  "calendarEvents",
  "secFilings",
  "recommendationTrend",
  "upgradeDowngradeHistory",
  "institutionOwnership",
  "fundOwnership",
  "majorDirectHolders",
  "majorHoldersBreakdown",
  "insiderTransactions",
  "insiderHolders",
  "netSharePurchaseActivity",
  "earnings",
  "earningsHistory",
  "earningsTrend",
  "industryTrend",
  "indexTrend",
  "sectorTrend",
];
StockMarketModules.quoteSummary({ symbol: "AAPL", modules: modules })
  .then((res) => console.log(res))
  .catch((error) => console.log(error));
1.0.8

6 months ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago