New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

marketreport

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marketreport

Download market report for NSE & BSE

latest
Source
npmnpm
Version
1.0.7
Version published
Weekly downloads
2
100%
Maintainers
0
Weekly downloads
 
Created
Source

MarketReport - NSE & BSE

Overview

MarketReport is an npm package designed to simplify the process of downloading the Indian market closing report from the National Stock Exchange (NSE) and Bombay Stock Exchange (BSE). This package provides a convenient API to fetch the closing report for a specified date.

Installation

You can install MarketReport using npm:

npm install marketreport

Usage

Here's how you can use MarketReport in your Node.js application:

const { getClosingReport } = require("marketreport");

API Reference

getClosingReport(exchange, date)

  • exchange: String - The exchange from which to fetch the closing report ('NSE' for National Stock Exchange, 'BSE' for Bombay Stock Exchange).
  • date: Date - The date for which to fetch the closing report.

Returns a Promise that resolves with the market data for the specified date and exchange.

Example

const { getClosingReport } = require("marketreport");

// Fetch BSE closing report for May 17, 2024
getClosingReport("BSE", new Date("2024-05-17"))
  .then((report) => {
    console.log(JSON.stringify(report, null, 2));
  })
  .catch((e) => {
    console.error(e);
  });

Response

{
  "data": [
    {
      "name": "ABB India Limited",
      "isin": "INE117A01022",
      "symbol": "ABB",
      "series": "A",
      "open": 4699,
      "high": 4715.7,
      "low": 4656,
      "close": 4678.55,
      "last": 4678.55,
      "prev_close": 4673.95,
      "total_trading_volume": 1787,
      "total_trading_value": 8375148,
      "total_no_of_tx_executed": 381
    },
    {
      "name": "AEGIS LOGISTICS LTD.",
      "isin": "INE208C01025",
      "symbol": "AEGISLOG",
      "series": "A",
      "open": 350.45,
      "high": 355.45,
      "low": 346.45,
      "close": 349.35,
      "last": 349.7,
      "prev_close": 352.35,
      "total_trading_volume": 36265,
      "total_trading_value": 12666745,
      "total_no_of_tx_executed": 1619
    },
    {},
    {},
    ...
  ],
  "report_url": "https://www.bseindia.com/download/BhavCopy/Equity/BhavCopy_BSE_CM_0_0_0_20240101_F_0000.csv"
}

License

This package is licensed under the MIT License. Feel free to use and modify it as needed.

Issues

If you encounter any issues or have suggestions for improvement, please open an issue on GitHub.

Contribution

Contributions are welcome! Fork the repository, make your changes, and submit a pull request.

Keywords

marketClosingReport

FAQs

Package last updated on 28 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts