Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
stock-nse-india
Advanced tools
Readme
This package will help us to get equity/index details and historical data from National Stock Exchange of India.
Please refer Documentation here.
See the Examples here
Install using 'npm'
npm i stock-nse-india
Install using 'yarn'
yarn add stock-nse-india
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)
})
// To get equity historical data for specific symbol
const range = {
start: new Date("2010-01-01"),
end: new Date("2021-03-20")
}
nseIndia.getEquityHistoricalData(symbol, range).then(data => {
console.log(data)
})
getDataByEndpoint - Get data by NSE API endpoints. API Endpoints list
Clone the repo locally using below command
git clone https://github.com/hi-imcodeman/stock-nse-india.git
Goto 'stock-nse-india' folder
cd stock-nse-india
Then install packages using 'npm' or 'yarn'
npm install
or
yarn
Start the application using 'npm' or 'yarn'
npm start
or
yarn start
Then open the URL http://localhost:3000 in browser.
For API service documentation please hit http://localhoast:3000/api-docs
We can use this package in CLI.
Install for CLI
npm i -g stock-nse-india
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"
Build and run the docker instance in local machine.
docker build -t nseindia . && docker run --rm -d -p 3001:3001 nseindia:latest
docker run --rm -d -p 3001:3001 imcodeman/nseindia
Open the browser and hit http://localhoast:3001
For API service documentation please hit http://localhoast:3001/api-docs
https://hub.docker.com/r/imcodeman/nseindia
Run the below command for testing and coverage.
yarn test
FAQs
This package will help us to get equity/index details and historical data from National Stock Exchange of India.
The npm package stock-nse-india receives a total of 67 weekly downloads. As such, stock-nse-india popularity was classified as not popular.
We found that stock-nse-india demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.