README
National Stock Exchange - India (Unofficial)
This package will help us to get equity details and historical data from National Stock Exchange of India.
Please refer API Documentation here.
See the Examples here
Installation
Install using 'npm'
npm i stock-nse-india
Install using 'yarn'
yarn add stock-nse-india
Run
Start the application using 'npm'
npm start
Start the application using 'yarn'
yarn start
Then open the URL http://localhost:3000 in browser
Usage
import { NseIndia } from "stock-nse-india";
const nseIndia = new NseIndia()
// To get all symbols from NSE
nseIndia.getAllStockSymbols().then(symbols => {
console.log(symbols)
})
// To get equity details for specific symbol
nseIndia.getEquityDetails('IRCTC').then(details => {
console.log(details)
})
CLI
We can use this package in CLI.
Install for CLI
npm i -g stock-nse-india
CLI Usage
To get CLI help
nseindia --help
To get market status
nseindia
To get the current equity details of the NSE symbol
nseindia equity IRCTC
To get the historical details of the NSE symbol
nseindia historical IRCTC
To get the details of the indices
nseindia index
To get the details of the specific index
nseindia index "NIFTY AUTO"
Docker
Start a instance
docker run --rm -d -p 3001:3001 imcodeman/nseindia
Test the instance
Open the browser and hit http://localhoast:3001
Docker Hub link
https://hub.docker.com/r/imcodeman/nseindia
Testing
Run the below command for testing and coverage.
yarn test