Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nsedownload/nsedownload

Python Library to get historical stocks data on NSE
https://github.com/nsedownload/nsedownload

adjusted-returns historical-data indices nse nse-index-data nse-stock-data nse-website pandas python python-2 python-3 python-library stock-market stocks trailing-returns

Last synced: 1 day ago
JSON representation

Python Library to get historical stocks data on NSE

Awesome Lists containing this project

README

        

# **NSEDownload** #

[![Bump Up version](https://github.com/NSEDownload/NSEDownload/actions/workflows/Bump.yaml/badge.svg)](https://github.com/NSEDownload/NSEDownload/actions/workflows/Bump.yaml)

A Python Library to download publicly available data on the NSE website for stocks as pandas dataframe.
For a detailed usage : Documentation

## **Installation** ##

```bash
git clone https://github.com/NSEDownload/NSEDownload
pip3 install NSEDownload/dist/*
```

## **Usage** ##

```python
from NSEDownload import stocks

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

Sample Output as a pandas dataframe :



Date
Symbol
Series
High Prices
Low Prices
Open Prices
Close Prices
Last Prices
Prec Close Price
Total Traded Quantity
Total Traded Value
52 Week High Price
52 Week Low Price




2021-08-11T18:30:00.000Z
HDFC
EQ
2675.25
2646.6
2656.6
2668.75
2666.0
2658.5
1702479
4532596291.9
2896
1623


2021-08-12T18:30:00.000Z
HDFC
EQ
2715.0
2662.0
2662.0
2704.15
2702.1
2668.75
3248615
8774705017.55
2896
1623


2021-08-15T18:30:00.000Z
HDFC
EQ
2734.45
2693.8
2696.8
2731.15
2732.7
2704.15
2465887
6709996706.95
2896
1623


2021-08-16T18:30:00.000Z
HDFC
EQ
2750.0
2707.15
2729.95
2738.4
2745.6
2731.15
2795510
7620988084.3
2896
1623


2021-08-17T18:30:00.000Z
HDFC
EQ
2770.3
2698.0
2750.0
2710.75
2710.0
2738.4
2501410
6828940469.75
2896
1623

## **Tips & Tricks** ##
1. You might run into access issues due to requests per second exceeding the permissible threshold. Add a delay of 5-10 seconds between multiple symbols to resolve the issue. ([Discussion](https://github.com/NSEDownload/NSEDownload/issues#issuecomment-1699721241))

## **Change Log** ##

1. Removed indices, returns, and adjusted stocks.
2. Made changes to use the new NSE site and cookies.

## **Contributing** ##

Your feedback matters! If you come across any bugs or issues, don't hesitate to raise them. Feel free to share your ideas for exciting new features

## **Buy me a coffee** ##

If you've found my work helpful and appreciate the effort, consider supporting me with a coffee! Your contribution goes a long way!


Buy Me A Coffee