All Projects → NSEDownload → NSEDownload

NSEDownload / NSEDownload

Licence: other
Python Library to get historical, adjusted data and generate trailing returns of stocks and indices on the NSE

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to NSEDownload

nse2r
Fetch data from National Stock Exchange, India
Stars: ✭ 21 (-67.69%)
Mutual labels:  stocks, historical-data, nse, nse-stock-data
mftool
Python library for getting real-time Mutual Funds data in India
Stars: ✭ 76 (+16.92%)
Mutual labels:  stock-market, historical-data, nse
Finance-Robinhood
Trade stocks and ETFs with free brokerage Robinhood and Perl
Stars: ✭ 42 (-35.38%)
Mutual labels:  stock-market, stocks, historical-data
NSE-Stock-Scanner
National Stock Exchange (NSE), India based Stock screener program. Supports Live Data, Swing / Momentum Trading, Intraday Trading, Connect to online brokers as Zerodha Kite, Risk Management, Emotion Control, Screening, Strategies, Backtesting, Automatic Stock Downloading after closing, live free day trading data and much more
Stars: ✭ 78 (+20%)
Mutual labels:  stock-market, stocks, nse
getbhavcopy
Free NSE and BSE data downloader
Stars: ✭ 93 (+43.08%)
Mutual labels:  stock-market, nse, nse-stock-data
Yahoo Finance Api
PHP client for Yahoo Finance API 📈
Stars: ✭ 179 (+175.38%)
Mutual labels:  stock-market, stocks
Graphvega
Open Source Options Analytics Platform.
Stars: ✭ 189 (+190.77%)
Mutual labels:  stock-market, stocks
TradeByte
💸 TradeByte - Stocks Trading Simulation WebApp
Stars: ✭ 30 (-53.85%)
Mutual labels:  stock-market, stocks
capm shiny
Demo project of creating an interactive analytical tool for stock market using CAPM.
Stars: ✭ 31 (-52.31%)
Mutual labels:  stock-market, stocks
Robinhood On Rails
A web dashboard for the free trading platform Robinhood using Ruby on Rails and a private API
Stars: ✭ 134 (+106.15%)
Mutual labels:  stock-market, stocks
Finance
Here you can find all the quantitative finance algorithms that I've worked on and refined over the past year!
Stars: ✭ 194 (+198.46%)
Mutual labels:  stock-market, stocks
market-monitor
Interactive app to monitor market using Python
Stars: ✭ 20 (-69.23%)
Mutual labels:  stock-market, stocks
Bullish
Stock market performance insights and trends in your inbox daily.
Stars: ✭ 171 (+163.08%)
Mutual labels:  stock-market, stocks
Tiingo Python
Python REST Client for interacting with the Tiingo Financial Data API
Stars: ✭ 152 (+133.85%)
Mutual labels:  stock-market, stocks
Sec Edgar Downloader
Download SEC filings from the EDGAR database using Python
Stars: ✭ 146 (+124.62%)
Mutual labels:  stock-market, stocks
Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (+281.54%)
Mutual labels:  stock-market, stocks
pair-trading-view
Pair Trading View - .NET application for visual analysis of synthetic financial instruments based on statistical models.
Stars: ✭ 45 (-30.77%)
Mutual labels:  stock-market, stocks
short-fork
Stock market helper: financial data, multipliers (PE, PS, PEG etc), insider selling, debt and short volume charts from various sources. All in one place!
Stars: ✭ 41 (-36.92%)
Mutual labels:  stock-market, stocks
pyEX
Python interface to IEX and IEX cloud APIs
Stars: ✭ 407 (+526.15%)
Mutual labels:  stock-market, stocks
Sumzerotrading
A Java API for Developing Automated Trading Applications for the Equity, Futures, and Currency Markets
Stars: ✭ 128 (+96.92%)
Mutual labels:  stock-market, stocks

NSEDownload

Bump Up version

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.

For a detailed usage : Documentation

Change Log

  1. Removed checking of name in stocks. check_stockSymbol is removed. Closest alternative suggestion is also removed. fuzzywuzzy package no longer required.
  2. Code cleanup: variable nomenclature, static variables and multithreaded code in scraper
  3. Change in requests: more resilient by adding backoff and retries.
  4. Specify Series as argument like 'ALL', 'BE' and 'EQ'. (By default set to 'EQ')

Installation

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

Usage

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 step 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 data for series BE
df = stocks.get_data(symbol = 'JSWENERGY', full_data=True, series="BE")

Sample Output as a pandas dataframe :

Date Symbol Series Prev Close Open Price High Price Low Price Last Price Close Price Average Price Total Traded Quantity Turnover No. of Trades Deliverable Qty % Dly Qt to Traded Qty
2021-09-15 RELIANCE EQ 2368.45 2368.5 2395.75 2368.5 2379.4 2378.3 2380.39 4186300 9.96505e+09 168130 2310144 55.18
2021-09-16 RELIANCE EQ 2378.3 2381.55 2436.75 2367 2424 2428.2 2408.55 6206657 1.49491e+10 214010 2473588 39.85
2021-09-17 RELIANCE EQ 2428.2 2446 2455.85 2375.6 2387 2390.55 2410.13 16098099 3.87986e+10 278098 9460717 58.77
2021-09-20 RELIANCE EQ 2390.55 2372.1 2418.35 2370 2391.85 2394.35 2398.57 5436385 1.30396e+10 171011 3042705 55.97
2021-09-21 RELIANCE EQ 2394.35 2405 2416.6 2384 2400 2404.7 2401.93 4576111 1.09915e+10 149803 2365643 51.7
2021-09-22 RELIANCE EQ 2404.7 2408 2442 2398.25 2430.8 2430.5 2426.47 5074612 1.23134e+10 179090 2811116 55.4
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")

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

Output

Date Open High Low Close Shares Traded Turnover (Rs. Cr)
2017-01-09 8259.35 8263 8227.75 8236.05 102211190 5197.62
2017-01-10 8262.7 8293.8 8261 8288.6 147312927 6904.57
2017-01-11 8327.8 8389 8322.25 8380.65 192285417 8938.68
2017-01-12 8391.05 8417.2 8382.3 8407.2 177948383 7359.24
2017-01-13 8457.65 8461.05 8373.15 8400.35 190949616 9156.16
2017-01-16 8390.95 8426.7 8374.4 8412.8 127938836 6043.67
2017-01-17 8415.05 8440.9 8378.3 8398 125781216 6389.21
2017-01-18 8403.85 8460.3 8397.4 8417 168867039 7411.23
2017-01-19 8418.4 8445.15 8404.05 8435.1 170956149 7324.14

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 any way, you can buy me a coffee.

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].