Package NSEDownload

A python Library to download publicly available data on NSE website for stocks and indices. Get the price history, adjusted prices and generate trailing returns of stocks and indices directly as a pandas dataframe.

Installation

git clone -b '4.0' https://github.com/NSEDownload/NSEDownload
pip3 install NSEDownload/dist/*

Usage

Stocks

from NSEDownload import stocks

# Gets data without adjustment for events
df = stocks.get_data(symbol='RELIANCE', start_date='15-9-2021', end_date='1-10-2021')

# Adjusts the given stock data for events
df = stocks.get_adjusted_data('RELIANCE', df)

# Do above steps in one line to get adjusted data
df = stocks.get_adjusted_stock(symbol='RELIANCE', start_date='15-9-2021', end_date='1-10-2021')

# Download all Series
df = stocks.get_adjusted_stock(symbol='RELIANCE', start_date='15-9-2021', end_date='1-10-2021', series='ALL')

Indices

from NSEDownload import indices

# Getting historical data for index using date range
df = indices.get_data(index_name="NIFTY 50", start_date="09-01-2017", end_date="14-08-2019")

Contributing

If you find any bugs or issue, please raise an issue for the same. You can also contribute by suggesting new features.

Buy me a coffee

If my work has helped you in anyway, you can buy me a coffee.

Buy Me A Coffee

Expand source code
"""
.. include:: ../index.md
"""

Sub-modules

NSEDownload.indices
NSEDownload.returns
NSEDownload.scraper
NSEDownload.static_data
NSEDownload.stocks