Skip to main content

A Python package to fetch data from the National Stock Exchange (NSE) of India

Project description

NseKit

A Python package to fetch data from the National Stock Exchange (NSE) of India, including market data, IPOs, indices, and more.

Installation

pip install NseKit

Usage

Refer Useage.py

#=====================================================================#
#                                   NseKit
#=====================================================================#

# from NseKit import NseKit, Moneycontrol
import NseKit, Moneycontrol
from rich.console import Console

# #------------------------------------------ Configuration Section ----------------------------------------------------------

# You can control settings globally or per-instance.

# # 1. GLOBAL SETTINGS (Affects all new Nse instances by default)
# NseKit.NseConfig.max_rps      = 2.0    # Default: 3.0
# NseKit.NseConfig.retries      = 3      # Default: 2
# NseKit.NseConfig.retry_delay  = 2.0    # Default: 2.0
# NseKit.NseConfig.cookie_cache = True   # Default: True  False

# 2. PER-INSTANCE SETTINGS (Overwrites global settings for this instance only)
# get_custom = NseKit.Nse(max_rps = 1.0, retries = 2, retry_delay  = 3.0, cookie_cache = True)

# 3. DEFAULT INSTANCE (Uses whatever is currently in NseConfig)
get  = NseKit.Nse()
# #-----------------
mc   = Moneycontrol
rich = Console()

#---------------------------------------------------------- Cookie ----------------------------------------------------------

# ๐Ÿ”น Cookie
get.clear_cookie_cache()                                                                    #  Delete the cookie cache

#---------------------------------------------------------- NSE Data ----------------------------------------------------------

# ๐Ÿ”น Market Status
print(get.nse_market_status("Market Status"))                                             # "Market Status" | "Mcap" | "Nifty50" | "Gift Nifty"
     
rich.print(get.nse_is_market_open("Capital Market"), "\n")                                # "Capital Market" | "Currency" | "Commodity" | "Debt" | "currencyfuture"

# ๐Ÿ”น Trading Holidays
print(get.nse_trading_holidays())                                                         # Trading holidays DataFrame
print(get.nse_trading_holidays(list_only=True))                                           # List of trading holiday dates

# ๐Ÿ”น Clearing Holidays
print(get.nse_clearing_holidays())                                                        # Clearing holidays DataFrame
print(get.nse_clearing_holidays(list_only=True))                                          # List of clearing holiday dates

# ๐Ÿ”น Check Trading Holiday
print(get.is_nse_trading_holiday())                                                       # Check if today is a trading holiday
print(get.is_nse_trading_holiday("25-Dec-2026"))                                          # Check if specific date is a trading holiday

# ๐Ÿ”น Check Clearing Holiday
print(get.is_nse_clearing_holiday())                                                      # Check if today is a clearing holiday
print(get.is_nse_clearing_holiday("25-Dec-2026"))                                         # Check if specific date is a clearing holiday

# ๐Ÿ”น Live Market Turnover
print(get.nse_live_market_turnover())                                                     # Live market turnover summary

# ๐Ÿ”น Historical Circulars
print(get.nse_live_hist_circulars())                                                      # Default: yesterday to today
print(get.nse_live_hist_circulars("18-07-2025", "18-10-2025"))                            # Specific date range
print(get.nse_live_hist_circulars(filter="Listing"))                                      # Filter by department


# ๐Ÿ”น Historical Press Releases
print(get.nse_live_hist_press_releases())                                                 # Default: yesterday to today
print(get.nse_live_hist_press_releases("18-07-2025", "18-10-2025"))                       # Specific date range
print(get.nse_live_hist_press_releases("01-10-2025", "4-10-2025", "NSE Listing"))         # Filter by department
'''
Corporate Communications , Investor Services Cell , Member Compliance , NSE Clearing , NSE Indices , NSE Listing , Surveillance 
'''

# ๐Ÿ”น Reference Rates
print(get.nse_reference_rates())                                                          # Currency reference rates

# ๐Ÿ”น Top 10 Nifty 50
print(get.nse_eod_top10_nifty50("17-10-25"))                                              # Top 10 Nifty 50 for specific trade date (DD-MM-YY)

# ๐Ÿ”น Nifty 50 List
print(get.nse_6m_nifty_50())                                                              # Nifty 50 constituents
print(get.nse_6m_nifty_50(list_only=True))                                                # List of Nifty 50 symbols

# ๐Ÿ”น F&O Full List
print(get.nse_eom_fno_full_list())                                                        # Full Stock F&O DataFrame
print(get.nse_eom_fno_full_list(list_only=True))                                          # Stock F&O symbols list only
print(get.nse_eom_fno_full_list("index"))                                                 # Full Index F&O DataFrame
print(get.nse_eom_fno_full_list("index", list_only=True))                                 # Index F&O symbols list only

# ๐Ÿ”น Nifty 500 List
print(get.nse_6m_nifty_500())                                                             # Nifty 500 constituents
print(get.nse_6m_nifty_500(list_only=True))                                               # List of Nifty 500 symbols

# ๐Ÿ”น Equity Full List
print(get.nse_eod_equity_full_list())                                                     # Full equity list
print(get.nse_eod_equity_full_list(list_only=True))                                       # List of equity symbols

# ๐Ÿ”น Indices Name List
print(get.list_of_indices())                                                              # Indices Name List                         {JSON}


print(get.state_wise_registered_investors())                                              # state wise registered investors           {JSON}


#---------------------------------------------------------- IPO Data ----------------------------------------------------------#

# ๐Ÿ”น Currently Open IPOs
print(get.ipo_current())

# ๐Ÿ”น Today's Special Pre-Open Session (Newly Listed IPOs)
print(get.ipo_preopen())

# ๐Ÿ”น IPO Tracker Summary
print(get.ipo_tracker_summary())                                                          # All YTD IPOs
print(get.ipo_tracker_summary("SME"))                                                     # SME IPOs Only
print(get.ipo_tracker_summary("Mainboard"))                                               # Mainboard IPOs Only



#---------------------------------------------------------- Pre-Open Market ----------------------------------------------------------

# ๐Ÿ”น Pre-Open Index Info
print(get.pre_market_nifty_info("NIFTY 50"))                                              # Index A/D Summary, "Nifty Bank" | "Emerge" | "Securities in F&O" | "Others" | "All"

# ๐Ÿ”น All NSE Pre-Open Advances/Declines Summary                                          โŒ unwanted function use print(get.pre_market_nifty_info("All")) 
print(get.pre_market_all_nse_adv_dec_info())                                              # NSE-wide Advance/Decline Data

# ๐Ÿ”น Pre-Open Market Stocks (All Categories)
print(get.pre_market_info("All"))                                                         # All Pre-Open Stocks
print(get.pre_market_info("NIFTY 50"))                                                    # Nifty 50 Pre-Open
print(get.pre_market_info("Nifty Bank"))                                                  # Bank Nifty Pre-Open
print(get.pre_market_info("Emerge"))                                                      # SME Pre-Open
print(get.pre_market_info("Securities in F&O"))                                           # F&O Stocks Pre-Open

# ๐Ÿ”น Pre-Open Market Derivatives
print(get.pre_market_derivatives_info("Stock Futures"))                                   # Derivatives Pre-Open data "Index Futures" | "Stock Futures"

#---------------------------------------------------------- Index Live Data ----------------------------------------------------------

# ๐Ÿ”น All NSE Indices Live Data
print(get.index_live_all_indices_data())                                                  # All Indices Live Snapshot

# ๐Ÿ”น Specific Index Constituents
print(get.index_live_indices_stocks_data("NIFTY 50"))                                     # Nifty 50 Stocks DataFrame
print(get.index_live_indices_stocks_data("NIFTY IT", list_only=True))                     # Only Nifty 50 Symbols

# ๐Ÿ”น Nifty 50 Returns Summary
print(get.index_live_nifty_50_returns())                                                  # 1Wโ€“5Y Nifty Return %

# ๐Ÿ”น Index Contribution Data
print(get.index_live_contribution())                                                      # Nifty 50 Stock-wise Index Contribution
print(get.index_live_contribution("Full"))                                                # Nifty 50 Full Stock-wise Index Contribution
print(get.index_live_contribution("NIFTY IT"))                                            # Index Stock-wise Contribution
print(get.index_live_contribution("NIFTY IT","Full"))                                     # Index Full Stock-wise Index Contribution



#---------------------------------------------------------- Index_Eod_Data ----------------------------------------------------------------#

# ๐Ÿ”น Fetch NSE Index EOD Bhavcopy for a specific date
print(get.index_eod_bhav_copy("17-10-2025"))                                              # Returns DataFrame of all indices for that date

# ๐Ÿ”น Fetch Historical Index Data (OHLC + Turnover)
print(get.index_historical_data("NIFTY 50", "01-01-2025", "17-10-2025"))
print(get.index_historical_data("NIFTY 50", "01-12-2025"))                                # Auto today date as "To date" 
print(get.index_historical_data("NIFTY BANK", "1W"))                                      # Last 1 Week      '1D','1W','1M','3M','6M','1Y','2Y','5Y','10Y','YTD','MAX'

# ๐Ÿ”น Fetch Historical Index P/E, P/B, Dividend Yield
print(get.index_pe_pb_div_historical_data("NIFTY 50", "01-01-2025", "17-10-2025"))
print(get.index_pe_pb_div_historical_data("NIFTY 50", "01-12-2025"))                      # Auto today date as "To date" 
print(get.index_pe_pb_div_historical_data("NIFTY BANK", "1Y"))                            # Last 1 year      '1D','1W','1M','3M','6M','1Y','2Y','5Y','10Y','YTD','MAX'

# ๐Ÿ”น Fetch Historical India VIX Data
print(get.india_vix_historical_data("01-08-2025", "17-10-2025"))                          # Direct date range
print(get.india_vix_historical_data("1M"))                                                # Last 6 months     "1M", "3M", "6M", "1Y", "2Y", "5Y", "10Y", "YTD", "MAX"


#---------------------------------------------------------- Live Gift Nifty & USDINR ----------------------------------------------------------------

# ๐Ÿ”น Fetch live Gift Nifty & USDINR data
print(get.cm_live_gifty_nifty())                                                          #  Gift Nifty & USDINR data

#---------------------------------------------------------- Live Market Statistics ----------------------------------------------------------------

# ๐Ÿ”น Fetch live Capital Market statistics from NSE
print(get.cm_live_market_statistics())                                                    #  Capital Market statistics



#---------------------------------------------------------- Capital Market Live Data ----------------------------------------------------------

# ๐Ÿ”น Equity Information           (Old)
print(get.cm_live_equity_info("RELIANCE"))                                                # Equity details for a symbol

# ๐Ÿ”น Equity Price Information     (Old)
print(get.cm_live_equity_price_info("RELIANCE"))                                          # Detailed price data with bid/ask levels


# ๐Ÿ”น Equity Information           (New)
print(get.cm_live_equity_full_info("RELIANCE"))                                           # Equity details for a symbol


# ๐Ÿ”น Most Active Equities by Value
print(get.cm_live_most_active_equity_by_value())                                          # Most active equities by traded value

# ๐Ÿ”น Most Active Equities by Volume
print(get.cm_live_most_active_equity_by_vol())                                            # Most active equities by traded volume

# ๐Ÿ”น Volume Spurts
print(get.cm_live_volume_spurts())                                                        # Volume Spurts

# ๐Ÿ”น 52-Week High
print(get.cm_live_52week_high())                                                          # Stocks hitting 52-week highs

# ๐Ÿ”น 52-Week Low
print(get.cm_live_52week_low())                                                           # Stocks hitting 52-week lows

# ๐Ÿ”น Block Deals
print(get.cm_live_block_deal())                                                           # Recent block deal data

# ๐Ÿ”น Insider Trading
print(get.cm_live_hist_insider_trading())                                                 # Today's Insider trading  
print(get.cm_live_hist_insider_trading("1M"))                                             # period                 "1D", "1W", "1M", "3M", "6M", "1Y"
print(get.cm_live_hist_insider_trading("01-01-2025", "15-10-2025"))                       # Date range
print(get.cm_live_hist_insider_trading("RELIANCE"))                                       # Today Insider trading for a symbol
print(get.cm_live_hist_insider_trading("RELIANCE", "1M"))                                 # Symbol with period     "1D", "1W", "1M", "3M", "6M", "1Y"
print(get.cm_live_hist_insider_trading("RELIANCE", "01-01-2025", "15-10-2025"))           # Symbol + date range

# ๐Ÿ”น Corporate Announcements
print(get.cm_live_hist_corporate_announcement())                                          # Corporate announcements 
print(get.cm_live_hist_corporate_announcement("14-10-2025", "15-10-2025"))                # Date range 
print(get.cm_live_hist_corporate_announcement("RELIANCE"))                                # Announcements for a symbol
print(get.cm_live_hist_corporate_announcement("RELIANCE", "01-01-2025", "15-10-2025"))    # Symbol + date range

# ๐Ÿ”น Corporate Actions
print(get.cm_live_hist_corporate_action())                                                # Corporate actions (default: next 90 days)  
print(get.cm_live_hist_corporate_action("1M"))                                            # period                 "1D", "1W", "1M", "3M", "6M", "1Y"
print(get.cm_live_hist_corporate_action("01-01-2025", "15-10-2025"))                      # Date range
print(get.cm_live_hist_corporate_action("LAURUSLABS"))                                    # Symbol Corporate actions
print(get.cm_live_hist_corporate_action("LAURUSLABS", "1Y"))                              # Symbol with period     "1D", "1W", "1M", "3M", "6M", "1Y"
print(get.cm_live_hist_corporate_action("RELIANCE", "01-01-2025", "15-10-2025"))          # Symbol + date range
print(get.cm_live_hist_corporate_action("01-01-2025", "15-03-2025", "Dividend"))          # Filter by date and purpose


# ๐Ÿ”น Today's Event Calendar
print(get.cm_live_today_event_calendar())                                                 # Today's corporate events
print(get.cm_live_today_event_calendar("01-01-2025", "01-01-2025"))                       # Specific date range

# ๐Ÿ”น Upcoming Event Calendar
print(get.cm_live_upcoming_event_calendar())                                              # Upcoming corporate events

# ๐Ÿ”น Board Meetings
print(get.cm_live_hist_board_meetings())                                                  # Board meetings
print(get.cm_live_hist_board_meetings("01-01-2025", "15-10-2025"))                        # Date range
print(get.cm_live_hist_board_meetings("RELIANCE"))                                        # Board meetings for a symbol
print(get.cm_live_hist_board_meetings("RELIANCE", "01-01-2025", "15-10-2025"))            # Symbol + date range

# ๐Ÿ”น Shareholder Meetings
print(get.cm_live_hist_Shareholder_meetings())                                            # Shareholder meetings
print(get.cm_live_hist_Shareholder_meetings("01-01-2025", "15-10-2025"))                  # Date range
print(get.cm_live_hist_Shareholder_meetings("RELIANCE"))                                  # Shareholder meetings for a symbol
print(get.cm_live_hist_Shareholder_meetings("RELIANCE", "01-01-2025", "15-10-2025"))      # Symbol + date range

# ๐Ÿ”น Qualified Institutional Placement (QIP)
print(get.cm_live_hist_qualified_institutional_placement("In-Principle"))
print(get.cm_live_hist_qualified_institutional_placement("Listing Stage"))
print(get.cm_live_hist_qualified_institutional_placement("In-Principle", "1Y"))           # QIP for a period: "1D", "1W", "1M", "3M", "6M", "1Y"
print(get.cm_live_hist_qualified_institutional_placement("Listing Stage", "1Y"))
print(get.cm_live_hist_qualified_institutional_placement("In-Principle", "01-01-2025", "15-10-2025"))
print(get.cm_live_hist_qualified_institutional_placement("Listing Stage", "01-01-2025", "15-10-2025"))

print(get.cm_live_hist_qualified_institutional_placement("RELIANCE"))                                                 # QIP for a symbol
print(get.cm_live_hist_qualified_institutional_placement("In-Principle", "RELIANCE", "01-01-2025"))                   # Auto today date as "To date"
print(get.cm_live_hist_qualified_institutional_placement("In-Principle", "RELIANCE", "01-01-2025", "15-10-2025"))     # Symbol + date range + stage

# ๐Ÿ”น Preferential Issue
print(get.cm_live_hist_preferential_issue("In-Principle"))
print(get.cm_live_hist_preferential_issue("Listing Stage"))
print(get.cm_live_hist_preferential_issue("In-Principle", "1Y"))                          # Preferential issue for a period: "1D", "1W", "1M", "3M", "6M", "1Y"
print(get.cm_live_hist_preferential_issue("Listing Stage", "1Y"))
print(get.cm_live_hist_preferential_issue("In-Principle", "01-01-2025", "15-10-2025"))
print(get.cm_live_hist_preferential_issue("Listing Stage", "01-01-2025", "15-10-2025"))

print(get.cm_live_hist_preferential_issue("RELIANCE"))                                                                # Preferential issue for a symbol
print(get.cm_live_hist_preferential_issue("In-Principle", "RELIANCE", "01-01-2025"))                                  # Auto today date as "To date"
print(get.cm_live_hist_preferential_issue("In-Principle", "RELIANCE", "01-01-2025", "15-10-2025"))                    # Symbol + date range + stage

# ๐Ÿ”น Right Issue
print(get.cm_live_hist_right_issue("In-Principle"))
print(get.cm_live_hist_right_issue("Listing Stage"))
print(get.cm_live_hist_right_issue("In-Principle", "1Y"))                                 # Right issue for a period: "1D", "1W", "1M", "3M", "6M", "1Y"
print(get.cm_live_hist_right_issue("Listing Stage", "1Y"))
print(get.cm_live_hist_right_issue("In-Principle", "01-01-2025", "15-10-2025"))
print(get.cm_live_hist_right_issue("Listing Stage", "01-01-2025", "15-10-2025"))

print(get.cm_live_hist_right_issue("RELIANCE"))                                                                       # Right issue for a symbol
print(get.cm_live_hist_right_issue("In-Principle", "RELIANCE", "01-01-2025"))                                         # Auto today date as "To date"
print(get.cm_live_hist_right_issue("In-Principle", "RELIANCE", "01-01-2025", "15-10-2025"))                           # Symbol + date range + stage


# ๐Ÿ”น Voting Results
print(get.cm_live_voting_results())                                                       # Corporate voting results

# ๐Ÿ”น Quarterly Shareholding Patterns
print(get.cm_live_qtly_shareholding_patterns())                                           # Quarterly shareholding patterns

# ๐Ÿ”น Annual Reports
print(get.recent_annual_reports())                                                        # Recent 20 Annual reports

# ๐Ÿ”น Business Responsibility and Sustainability Reports
print(get.cm_live_hist_br_sr())                                                           # All Business Responsibility and Sustainability Reports
print(get.cm_live_hist_br_sr("RELIANCE"))                                                 # Business Responsibility and Sustainability Reports for a symbol
print(get.cm_live_hist_br_sr("01-01-2025", "15-10-2025"))                                 # Date range
print(get.cm_live_hist_br_sr("RELIANCE", "01-01-2025", "15-10-2025"))                     # Symbol + date range


# ๐Ÿ”น Quarterly Results - {JSON}
print(get.quarterly_financial_results('TCS'))                                             # Last 3 Quarterly Results Consolidated/Standalone (Income, PBT, Net Profit, EPS)

url = "https://nsearchives.nseindia.com/corporate/ixbrl/INTEGRATED_FILING_INDAS_139754_02022026201126_iXBRL_WEB.html"
print(get.html_tables(url, show_tables=False, output="json"))


#---------------------------------------------------------- Live Chart Data ----------------------------------------------------------

print(get.index_chart("NIFTY 50","1D"))                                                    # "1D" "1M" "3M" "6M" "1Y"
print(get.stock_chart("RELIANCE", "1D"))
print(get.fno_chart("TCS", "FUTSTK","30-03-2026"))
print(get.fno_chart("NIFTY", "OPTIDX","30-03-2026","PE25700"))

print(get.india_vix_chart())

#---------------------------------------------------------- FnO Live Data ----------------------------------------------------------

# ๐Ÿ”น All Futures & Options contracts Data                 
#           (JSON format only)
print(get.symbol_full_fno_live_data("TCS"))                                               
print(get.symbol_specific_most_active_Calls_or_Puts_or_Contracts_by_OI("TCS","C"))        # Most Active Calls "C" | Puts "P" | Contracts by Open Interest (OI) "O"
print(get.identifier_based_fno_contracts_live_chart_data("OPTSTKTCS30-12-2025CE3300.00")) 

# ๐Ÿ”น Futures Data
print(get.fno_live_futures_data("RELIANCE"))                                              # Stock futures data for a symbol
print(get.fno_live_futures_data("NIFTY"))                                                 # Index futures data for a symbol

# ๐Ÿ”น Top 20 Contracts Stock Futures, Stock Options
print(get.fno_live_top_20_derivatives_contracts("Stock Futures"))                         # Top 20 Contracts       "Stock Futures" | "Stock Options"


# ๐Ÿ”น Most Active Futures Contracts by Volume
print(get.fno_live_most_active_futures_contracts("Volume"))                               # Most active futures by volume
print(get.fno_live_most_active_futures_contracts("Value"))                                # Most active futures by Value


# ๐Ÿ”น Most Active
print(get.fno_live_most_active("Index", "Call", "Volume"))                                # Most active index call options
print(get.fno_live_most_active("Index", "Call", "Value"))                                 # Most active index calls by traded value 
print(get.fno_live_most_active("Index", "Put", "Volume"))                                 # Most active index put options
print(get.fno_live_most_active("Index", "Put", "Value"))                                  # Most active index puts by traded value

print(get.fno_live_most_active("Stock", "Call", "Volume"))                                # Most active stock call options
print(get.fno_live_most_active("Stock", "Call", "Value"))                                 # Most active stock calls by traded value
print(get.fno_live_most_active("Stock", "Put", "Volume"))                                 # Most active stock put options
print(get.fno_live_most_active("Stock", "Put", "Value"))                                  # Most active stock puts by traded value 


# ๐Ÿ”น Most Active Contracts by Open Interest
print(get.fno_live_most_active_contracts_by_oi())                                         # Most active contracts by open interest

# ๐Ÿ”น Most Active Contracts by Volume
print(get.fno_live_most_active_contracts_by_volume())                                     # Most active contracts by volume

# ๐Ÿ”น Most Active Options Contracts by Volume
print(get.fno_live_most_active_options_contracts_by_volume())                             # Most active options by volume

# ๐Ÿ”น Most Active Underlying
print(get.fno_live_most_active_underlying())                                              # Most Active Underlying

# ๐Ÿ”น Change in Open Interest
print(get.fno_live_change_in_oi())                                                        # Change in Open Interest

# ๐Ÿ”น Price Vs OI
print(get.fno_live_oi_vs_price())                                                         # Price Vs OI   (Rise in OI and Rise in Price, Rise in OI and Slide in Price, etc)

# ๐Ÿ”น Expiry Date - Raw   
print(get.fno_expiry_dates_raw())                                                         # Nifty All Expiry Date                     {JSON}   
print(get.fno_expiry_dates_raw("TCS"))                                                    # TCS All Expiry Date                       {JSON}

# ๐Ÿ”น Expiry Date
print(get.fno_expiry_dates())                                                             # Nifty All Expiry Date
print(get.fno_expiry_dates("TCS"))                                                        # TCS All Expiry Date

print(get.fno_expiry_dates("NIFTY", "Current"))                                           # Nifty Current Expiry Date only โ†’ "28-10-2025"
print(get.fno_expiry_dates("NIFTY", "Next Week"))                                         # Nifty Next Week Expiry Date only โ†’ "04-11-2025"
print(get.fno_expiry_dates("NIFTY", "Month"))                                             # Nifty Month Expiry Date only โ†’ "25-11-2025"
print(get.fno_expiry_dates("NIFTY", "All"))                                               # โ†’ ["28-10-2025", "04-11-2025", "25-11-2025"]

print(get.fno_expiry_dates("TCS", "Current"))                                             # TCS Current Expiry Date only
print(get.fno_expiry_dates("TCS", "Month"))                                               # TCS Next Month Expiry Date only


# ๐Ÿ”น Option Chain
print(get.fno_live_option_chain("RELIANCE"))                                              # Option chain for a stock symbol
print(get.fno_live_option_chain("NIFTY"))                                                 # Option chain for an index
print(get.fno_live_option_chain("RELIANCE", expiry_date="27-Jan-2026"))                   # Option chain with specific expiry
print(get.fno_live_option_chain("RELIANCE", oi_mode="compact"))                           # Compact option chain data

print(get.fno_live_option_chain_raw("M&M", expiry_date="27-Jan-2026"))                    # Raw Option chain with specific expiry     {JSON}

# ๐Ÿ”น Active Contracts
print(get.fno_live_active_contracts("NIFTY"))                                             # Active index option contracts
print(get.fno_live_active_contracts("NIFTY", expiry_date="27-Jan-2026"))                   # Active index contracts with expiry

print(get.fno_live_active_contracts("RELIANCE"))                                          # Active stock option contracts
print(get.fno_live_active_contracts("RELIANCE", expiry_date="27-Jan-2026"))                # Active stock contracts with expiry


#---------------------------------------------------------- CM EOD Data ----------------------------------------------------------

# ๐Ÿ”น FII/DII Activity
print(get.cm_eod_fii_dii_activity())                                                      # Latest FII/DII trading activity
print(get.cm_eod_fii_dii_activity("Nse"))                                                 # Latest FII/DII trading activity in NSE

# ๐Ÿ”น Market Activity Report
print(get.cm_eod_market_activity_report("17-10-25"))                                      # Market activity for specific date

# ๐Ÿ”น Bhavcopy with Delivery
print(get.cm_eod_bhavcopy_with_delivery("17-10-2025"))                                    # Full bhavcopy with delivery data

# ๐Ÿ”น Equity Bhavcopy
print(get.cm_eod_equity_bhavcopy("17-10-2025"))                                           # Equity-only bhavcopy

# ๐Ÿ”น 52-Week High/Low
print(get.cm_eod_52_week_high_low("17-10-2025"))                                          # 52-week high/low for date

# ๐Ÿ”น Bulk Deals (Latest)
print(get.cm_eod_bulk_deal())                                                             # Latest bulk deals

# ๐Ÿ”น Block Deals (Latest)
print(get.cm_eod_block_deal())                                                            # Latest block deals

# ๐Ÿ”น Short Selling
print(get.cm_eod_shortselling("17-10-2025"))                                              # Short selling for date

# ๐Ÿ”น Surveillance Indicator
print(get.cm_eod_surveillance_indicator("17-10-25"))                                      # Surveillance for date (yy format)

# ๐Ÿ”น Series Change
print(get.cm_eod_series_change())                                                         # Latest series changes

# ๐Ÿ”น Equity Band Changes
print(get.cm_eod_eq_band_changes("17-10-2025"))                                           # Band changes for date

# ๐Ÿ”น Equity Price Band(EOD)
print(get.cm_eod_eq_price_band("17-10-2025"))                                             # Price bands for date

# ๐Ÿ”น Equity Price Band(Historical)
print(get.cm_hist_eq_price_band())                                                        # today date data for all symbol
print(get.cm_hist_eq_price_band("1W"))                                                    # 1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_eq_price_band("01-10-2025"))                                            # From Date given auto To date (today Date)
print(get.cm_hist_eq_price_band("15-10-2025", "17-10-2025"))                              # Date range
print(get.cm_hist_eq_price_band("WEWIN"))                                                 # Bulk deals for symbol
print(get.cm_hist_eq_price_band("WEWIN", "1Y"))                                           # 1Y for symbol    1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_eq_price_band("DSSL", "01-10-2025"))                                    # From Date given auto To date (today Date) for symbol
print(get.cm_hist_eq_price_band("DSSL", "01-10-2025", "17-10-2025"))                      # Date range for symbol

# ๐Ÿ”น PE Ratio
print(get.cm_eod_pe_ratio("17-10-25"))                                                    # PE ratios for date (yy format)

# ๐Ÿ”น Market Cap
print(get.cm_eod_mcap("17-10-25"))                                                        # Market cap for date (yy format)

# ๐Ÿ”น Equity Name Change
print(get.cm_eod_eq_name_change())                                                        # Latest name changes

# ๐Ÿ”น Equity Symbol Change
print(get.cm_eod_eq_symbol_change())                                                      # Latest symbol changes

# ๐Ÿ”น Historical Security Data
print(get.cm_hist_security_wise_data("RELIANCE"))                                         # 1Y data for symbol
print(get.cm_hist_security_wise_data("RELIANCE", "2Y"))                                   # 1Y for symbol    1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_security_wise_data("RELIANCE", "01-10-2025", "17-10-2025"))             # Date range for symbol

# ๐Ÿ”น Historical Bulk Deals
print(get.cm_hist_bulk_deals())                                                           # today date data for all symbol
print(get.cm_hist_bulk_deals("1W"))                                                       # 1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_bulk_deals("01-10-2025"))                                               # From Date given auto To date (today Date)
print(get.cm_hist_bulk_deals("15-10-2025", "17-10-2025"))                                 # Date range
print(get.cm_hist_bulk_deals("RELIANCE"))                                                 # Bulk deals for symbol
print(get.cm_hist_bulk_deals("DSSL", "1Y"))                                               # 1Y for symbol    1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_bulk_deals("DSSL", "01-10-2025"))                                       # From Date given auto To date (today Date) for symbol
print(get.cm_hist_bulk_deals("DSSL", "01-10-2025", "17-10-2025"))                         # Date range for symbol

# ๐Ÿ”น Historical Block Deals
print(get.cm_hist_block_deals())                                                          # today date data for all symbol
print(get.cm_hist_block_deals("1W"))                                                      # 1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_block_deals("01-10-2025"))                                              # From Date given auto To date (today Date)
print(get.cm_hist_block_deals("15-10-2025", "17-10-2025"))                                # Date range
print(get.cm_hist_block_deals("RELIANCE"))                                                # Bulk deals for symbol
print(get.cm_hist_block_deals("DSSL", "1Y"))                                              # 1Y for symbol    1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_block_deals("DSSL", "01-10-2025"))                                      # From Date given auto To date (today Date) for symbol
print(get.cm_hist_block_deals("DSSL", "01-10-2025", "17-10-2025"))                        # Date range for symbol


# ๐Ÿ”น Historical Short Selling
print(get.cm_hist_short_selling())                                                        # today date data for all symbol
print(get.cm_hist_short_selling("1W"))                                                    # 1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_short_selling("01-10-2025"))                                            # From Date given auto To date (today Date)
print(get.cm_hist_short_selling("15-10-2025", "17-10-2025"))                              # Date range
print(get.cm_hist_short_selling("RELIANCE"))                                              # Bulk deals for symbol
print(get.cm_hist_short_selling("DSSL", "1Y"))                                            # 1Y for symbol    1D, 1W, 1M, 3M, 6M, 1Y
print(get.cm_hist_short_selling("DSSL", "01-10-2025"))                                    # From Date given auto To date (today Date) for symbol
print(get.cm_hist_short_selling("DSSL", "01-10-2025", "17-10-2025"))                      # Date range for symbol


# ๐Ÿ”น Business Growth Data
print(get.cm_dmy_biz_growth())                                                            # Current month daily
print(get.cm_dmy_biz_growth("monthly"))                                                   # Current FY monthly
print(get.cm_dmy_biz_growth("yearly"))                                                    # All yearly
print(get.cm_dmy_biz_growth("daily", "OCT", 2025))                                        # Oct 2025 daily
print(get.cm_dmy_biz_growth("monthly", 2025))                                             # FY 2025 monthly

# ๐Ÿ”น Monthly Settlement Report
print(get.cm_monthly_settlement_report())                                                 # Current FY
print(get.cm_monthly_settlement_report("1Y"))                                             # Last 1 FY
print(get.cm_monthly_settlement_report("2024", 2026))                                     # FY 2024-25 to 2025-26
print(get.cm_monthly_settlement_report("3Y"))                                             # Last 3 FYs

# ๐Ÿ”น Monthly Most Active Equity
print(get.cm_monthly_most_active_equity())                                                # Latest monthly most active

# ๐Ÿ”น Advances/Declines
print(get.historical_advances_decline())                                                  # Previous month (Month_wise)
print(get.historical_advances_decline("2025"))                                            # 2025 Month_wise
print(get.historical_advances_decline("Day_wise", "OCT", 2025))                           # Oct 2025 Day_wise
print(get.historical_advances_decline("Month_wise", 2024))                                # 2024 Month_wise


#---------------------------------------------------------- FnO EOD Data ----------------------------------------------------------

# ๐Ÿ”น F&O Bhavcopy
print(get.fno_eod_bhav_copy("16-02-2026"))                                                # F&O bhavcopy for a specific trade date (DD-MM-YYYY)

# ๐Ÿ”น FII Stats
print(get.fno_eod_fii_stats("17-10-2025"))                                                # FII statistics for a specific trade date (DD-MM-YYYY)

# ๐Ÿ”น Top 10 Futures
print(get.fno_eod_top10_fut("17-10-2025"))                                                # Top 10 futures contracts (DD-MM-YYYY)

# ๐Ÿ”น Top 20 Options
print(get.fno_eod_top20_opt("17-10-2025"))                                                # Top 20 options contracts (DD-MM-YYYY)

# ๐Ÿ”น Security Ban
print(get.fno_eod_sec_ban("17-10-2025"))                                                  # Securities in ban period (DD-MM-YYYY)

# ๐Ÿ”น MWPL (Market Wide Position Limit)
print(get.fno_eod_mwpl_3("17-10-2025"))                                                   # MWPL data for a specific trade date (DD-MM-YYYY)

# ๐Ÿ”น Combined Open Interest
print(get.fno_eod_combine_oi("17-10-2025"))                                               # Combined OI data (DD-MM-YYYY)

# ๐Ÿ”น Participant-Wise Open Interest
print(get.fno_eod_participant_wise_oi("17-10-2025"))                                      # Participant-wise OI data (DD-MM-YYYY)

# ๐Ÿ”น Participant-Wise Volume
print(get.fno_eod_participant_wise_vol("17-10-2025"))                                     # Participant-wise volume data (DD-MM-YYYY)

# ๐Ÿ”น  Historical Futures
print(get.future_price_volume_data("NIFTY", "Index", "OCT-25", "01-10-2025", "17-10-2025"))
print(get.future_price_volume_data("ITC", "Stock Futures", "OCT-25", "04-10-2025"))
print(get.future_price_volume_data("BANKNIFTY", "Index Futures", "3M"))
print(get.future_price_volume_data("NIFTY", "Index Futures", "NOV-24"))

# ๐Ÿ”น  Historical Options
print(get.option_price_volume_data("NIFTY", "Index", "01-10-2025", "17-10-2025", expiry= "20-10-2025"))
print(get.option_price_volume_data("TCS", "Stock Options","3000","CE", "01-02-2026", "06-02-2026", expiry= "24-02-2026"))
print(get.option_price_volume_data("BANKNIFTY", "Index Options","47000", "01-10-2025", "17-10-2025", expiry= "28-10-2025"))
print(get.option_price_volume_data("ITC", "Stock Options", "04-10-2025", expiry= "28-10-2025"))
print(get.option_price_volume_data("BANKNIFTY", "Index Options", "3M"))
print(get.option_price_volume_data("NIFTY", "Index Options","PE", "01-10-2025", expiry= "28-10-2025"))

# ๐Ÿ”น F&O Lot Size
print(get.fno_eom_lot_size())                                                             # Latest F&O lot sizes
print(get.fno_eom_lot_size("TCS"))                                                        # F&O lot sizes for symbol 

# ๐Ÿ”น DMY Business Growth
print(get.fno_dmy_biz_growth())                                                           # Monthly F&O business growth (default: current year)
print(get.fno_dmy_biz_growth("yearly"))                                                   # Yearly F&O data
print(get.fno_dmy_biz_growth("daily", month="OCT", year=2025))                            # Daily F&O data for specific month/year

# ๐Ÿ”น Monthly Settlement Report
print(get.fno_monthly_settlement_report())                                                # Current FY F&O settlement stats
print(get.fno_monthly_settlement_report("2024", "2025"))                                  # Specific FY range
print(get.fno_monthly_settlement_report("2Y"))                                            # Last 2 FYs


#---------------------------------------------------------- SEBI Data ----------------------------------------------------------

# ๐Ÿ”น SEBI Circulars
print(get.sebi_circulars())                                                               # Default: last 1 week
print(get.sebi_circulars("01-10-2025", "10-10-2025"))                                     # Specific date range (DD-MM-YYYY)
print(get.sebi_circulars("01-10-2025"))                                                   # From date to today
print(get.sebi_circulars("1M"))                                                           # 1W, 2W, 3W, 1M, 2M, 3M, 6M, 1Y , 2Y

# ๐Ÿ”น SEBI Data (Paged Circulars)
print(get.sebi_data())                                                                    # Fetch latest SEBI circulars (default: 1 page)






#---------------------------------------------------------- Money control ----------------------------------------------------------

# ๐Ÿ”น Advances/Declines data
print(mc.fetch_adv_dec("NIFTY 50"))                                                       # Advances/Declines data
print(mc.fetch_adv_dec("NIFTY 500"))                                                      # Advances/Declines data





#---------------------------------------------------------- CSV save ----------------------------------------------------------

import NseKit

get = NseKit.Nse()

# # ๐Ÿ”น Fetch Historical Index Data (OHLC + Turnover)
# print(get.index_historical_data("NIFTY50 USD", "01-01-2025", "17-10-2025"))
# print(get.index_historical_data("NIFTY50 USD", "01-12-2025"))                                 # Auto today date as "To date" 
# print(get.index_historical_data("NIFTY50 USD", "2Y"))                                         # Last 1 Week      '1D','1W','1M','3M','6M','1Y','2Y','5Y','10Y','YTD','MAX'

data = get.index_historical_data("NIFTY50 USD", "1W")
print(data.tail())

# Save to CSV
data.to_csv("Data.csv", index=True)

print("CSV file saved successfully.")

Requirements

  • Python 3.7+

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nsekit-0.0.24.tar.gz (137.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nsekit-0.0.24-py3-none-any.whl (125.1 kB view details)

Uploaded Python 3

File details

Details for the file nsekit-0.0.24.tar.gz.

File metadata

  • Download URL: nsekit-0.0.24.tar.gz
  • Upload date:
  • Size: 137.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nsekit-0.0.24.tar.gz
Algorithm Hash digest
SHA256 b2972041de3a74e4e841abbc6260c7f20576a156bf8c6fd567a99103f72f87db
MD5 9ac8607dc8e2c621d5256c6517fd3491
BLAKE2b-256 afe0f6c7871c71d4296617b858569c4d1061d67b7a19887e9f85b3b8f3724ad1

See more details on using hashes here.

File details

Details for the file nsekit-0.0.24-py3-none-any.whl.

File metadata

  • Download URL: nsekit-0.0.24-py3-none-any.whl
  • Upload date:
  • Size: 125.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nsekit-0.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 c3696c92bca19fd208fd49a764f7e5ebdebf9ac651c4c4f829530bbe47113f08
MD5 893517a2cfaa4d0406ecf622f7689ac8
BLAKE2b-256 0f7940eaf0250ecdfa5153be14c61de74a981432f850869003e42573cdc0872e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page