Module NSEDownload.static_data

Expand source code
def get_common_names_indices():
    return ["NIFTY 50", "NIFTY Next 50", "NIFTY Midcap Liquid 15", "NIFTY 100", "NIFTY 200", "NIFTY 500",
            "NIFTY Midcap 150", "NIFTY Midcap 50", "NIFTY Full Midcap 100", "NIFTY Midcap 100", "NIFTY Smallcap 250",
            "NIFTY Smallcap 50", "NIFTY Full Smallcap 100", "NIFTY Smallcap 100", "NIFTY LargeMidcap 250",
            "NIFTY MidSmallcap 400", "NIFTY Auto", "NIFTY Bank", "NIFTY Financial Services", "NIFTY FMCG", "NIFTY IT",
            "NIFTY Media", "NIFTY Metal", "NIFTY Pharma", "NIFTY Private Bank", "NIFTY PSU Bank", "NIFTY Realty",
            "NIFTY Commodities", "NIFTY India Consumption", "NIFTY CPSE", "NIFTY Energy", "NIFTY100 ESG",
            "NIFTY100 Enhanced ESG", "NIFTY Infra", "NIFTY MNC", "NIFTY PSE", "NIFTY SME EMERGE",
            "NIFTY Services Sector", "NIFTY Shariah 25", "NIFTY50 Shariah", "NIFTY500 Shariah",
            "NIFTY Aditya Birla Group", "NIFTY Mahindra Group", "NIFTY Tata Group", "NIFTY Tata Group 25% Cap",
            "NIFTY100 LIQ 15", "NIFTY Midcap Liquid 15", "NIFTY500 Value 50", "NIFTY Alpha Low-Volatility 30",
            "NIFTY Quality Low-Volatility 30", "NIFTY Alpha Quality Low-Volatility 30",
            "NIFTY Alpha Quality Value Low-Volatility 30", "NIFTY50 Equal Weight", "NIFTY100 Equal Weight",
            "NIFTY100 Low Volatility 30", "NIFTY50 USD", "NIFTY50 Dividend Points", "NIFTY Dividend Opportunities 50",
            "NIFTY100 Alpha 30", "NIFTY Alpha 50", "NIFTY 50 Arbitrage", "NIFTY 50 Futures Index",
            "NIFTY 50 Futures TR Index", "NIFTY High Beta 50", "NIFTY Low Volatility 50", "NIFTY200 Quality 30",
            "NIFTY100 Quality 30", "NIFTY50 Value 20", "NIFTY Growth Sectors 15", "NIFTY50 TR 2X Leverage",
            "NIFTY50 PR 2X Leverage", "NIFTY50 TR 1X Inverse", "NIFTY50 PR 1X Inverse", "NIFTY Composite G-sec Index",
            "NIFTY 4-8 yr G-Sec Index", "NIFTY 8-13 yr G-Sec", "NIFTY 10 yr Benchmark G-Sec",
            "NIFTY 10 yr Benchmark G-Sec (Clean Price)", "NIFTY 11-15 yr G-Sec Index",
            "NIFTY 15 yr and above G-Sec Index", "NIFTY 10 Year SDL Index", "NIFTY AAA Corporate Bond",
            "NIFTY AAA Ultra Short-Term Corporate Bond", "NIFTY AAA Short-Term Corporate Bond",
            "NIFTY AAA Medium-Term Corporate Bond", "NIFTY AAA Long-Term Corporate Bond",
            "NIFTY AAA Ultra Long-Term Corporate Bond", "Nifty 1D Rate Index", 'NIFTY 50', 'NIFTY Next 50', 'NIFTY 100',
            'NIFTY 200', 'NIFTY 500', 'NIFTY Midcap 150', 'NIFTY Midcap 50', 'NIFTY Full Midcap 100',
            'NIFTY Midcap 100', 'NIFTY Smallcap 250', 'NIFTY Smallcap 50', 'NIFTY Full Smallcap 100',
            'NIFTY Smallcap 100', 'NIFTY LargeMidcap 250', 'NIFTY MidSmallcap 400', 'NIFTY Auto', 'NIFTY Bank',
            'NIFTY Financial Services', 'NIFTY FMCG', 'NIFTY IT', 'NIFTY Media', 'NIFTY Metal', 'NIFTY Pharma',
            'NIFTY Private Bank', 'NIFTY PSU Bank', 'NIFTY Realty', 'NIFTY Commodities', 'NIFTY CPSE', 'NIFTY Energy',
            'NIFTY100 ESG', 'NIFTY100 Enhanced ESG', 'NIFTY India Consumption', 'NIFTY Infrastructure',
            'NIFTY Midcap Liquid 15', 'NIFTY MNC', 'NIFTY PSE', 'NIFTY SME EMERGE', 'NIFTY Services Sector',
            'NIFTY Shariah 25', 'NIFTY100 Liquid 15', 'NIFTY50 Shariah', 'NIFTY500 Shariah', 'NIFTY Aditya Birla Group',
            'NIFTY Mahindra Group', 'NIFTY Tata Group', 'NIFTY Tata Group 25% Cap', 'NIFTY500 Value 50',
            'NIFTY Alpha Low-Volatility 30', 'NIFTY Quality Low-Volatility 30', 'NIFTY Alpha Quality Low-Volatility 30',
            'NIFTY Alpha Quality Value Low-Volatility 30', 'NIFTY50 Equal Weight', 'NIFTY100 Equal Weight',
            'NIFTY100 Low Volatility 30', 'NIFTY Dividend Opportunities 50', 'NIFTY100 Alpha 30', 'NIFTY Alpha 50',
            'NIFTY High Beta 50', 'NIFTY Low Volatility 50', 'NIFTY200 Quality 30', 'NIFTY100 Quality 30',
            'NIFTY50 Value 20', 'NIFTY Growth Sectors 15']


def get_formatted_names_indices():
    return ['NIFTY 50', 'NIFTY NEXT 50', 'NIFTY MID LIQ 15', 'NIFTY 100', 'NIFTY 200', 'NIFTY 500', 'NIFTY MIDCAP 150',
            'NIFTY MIDCAP 50', 'NIFTY FULL MIDCAP 100', 'NIFTY MIDCAP 100', 'NIFTY SMALLCAP 250', 'NIFTY SMALLCAP 50',
            'NIFTY FULL SMALLCAP 100', 'NIFTY SMLCAP 100', 'NIFTY LargeMidcap 250', 'NIFTY MIDSMALLCAP 400',
            'NIFTY AUTO',
            'NIFTY BANK', 'NIFTY FIN SERVICE', 'NIFTY FMCG', 'NIFTY IT', 'NIFTY MEDIA', 'NIFTY METAL', 'NIFTY PHARMA',
            'NIFTY PVT BANK', 'NIFTY PSU BANK', 'NIFTY REALTY', 'NIFTY COMMODITIES', 'NIFTY CONSUMPTION', 'NIFTY CPSE',
            'NIFTY ENERGY', 'NIFTY100 ESG', 'NIFTY100 Enhanced ESG', 'NIFTY INFRA', 'NIFTY MNC', 'NIFTY PSE',
            'NIFTY SME EMERGE', 'NIFTY SERV SECTOR', 'NIFTY SHARIAH 25', 'NIFTY50 SHARIAH', 'NIFTY500 SHARIAH',
            'NIFTY ADITYA BIRLA GROUP', 'NIFTY MAHINDRA GROUP', 'NIFTY TATA GROUP', 'NIFTY TATA GROUP 25% CAP',
            'NIFTY100 LIQ 15', 'NIFTY MID LIQ 15', 'NIFTY500 VALUE 50', 'NIFTY ALPHA LOW-VOLATILITY 30',
            'NIFTY QUALITY LOW-VOLATILITY 30', 'NIFTY ALPHA QUALITY LOW-VOLATILITY 30',
            'NIFTY ALPHA QUALITY VALUE LOW-VOLATILITY 30', 'NIFTY50 EQL WGT', 'NIFTY100 EQL WGT', 'NIFTY100 LOWVOL30',
            'NIFTY50 USD', 'NIFTY50 DIV POINT', 'NIFTY DIV OPPS 50', 'NIFTY100 ALPHA 30', 'NIFTY ALPHA 50',
            'NIFTY 50 ARBITRAGE', 'NIFTY 50 FUTURES INDEX', 'NIFTY 50 FUTURES TR INDEX', 'NIFTY HIGH BETA 50',
            'NIFTY LOW VOLATILITY 50', 'NIFTY200 QUALITY 30', 'NIFTY100 Quality 30', 'NIFTY50 VALUE 20',
            'NIFTY GROWSECT 15',
            'NIFTY50 TR 2X LEV', 'NIFTY50 PR 2X LEV', 'NIFTY50 TR 1X INV', 'NIFTY50 PR 1X INV', 'NIFTY GS COMPSITE',
            'NIFTY GS 4 8YR', 'NIFTY GS 8 13YR', 'NIFTY GS 10YR', 'NIFTY GS 10YR CLN', 'NIFTY GS 11 15YR',
            'NIFTY GS 15YRPLUS', 'NIFTY 10 YEAR SDL INDEX', 'NIFTY AAA CORPORATE BOND',
            'NIFTY AAA ULTRA SHORT-TERM CORPORATE BOND', 'NIFTY AAA SHORT-TERM CORPORATE BOND',
            'NIFTY AAA MEDIUM-TERM CORPORATE BOND', 'NIFTY AAA LONG-TERM CORPORATE BOND', 'NIFTY 50', 'NIFTY NEXT 50',
            'NIFTY 100', 'NIFTY 200', 'NIFTY 500', 'NIFTY MIDCAP 150', 'NIFTY MIDCAP 50', 'NIFTY FULL MIDCAP 100',
            'NIFTY MIDCAP 100', 'NIFTY SMALLCAP 250', 'NIFTY SMALLCAP 50', 'NIFTY FULL SMALLCAP 100',
            'NIFTY SMALLCAP 100', 'NIFTY LARGEMIDCAP 250', 'NIFTY MIDSMALLCAP 400', 'NIFTY AUTO', 'NIFTY BANK',
            'NIFTY FINANCIAL SERVICES', 'NIFTY FMCG', 'NIFTY IT', 'NIFTY MEDIA', 'NIFTY METAL', 'NIFTY PHARMA',
            'NIFTY PRIVATE BANK', 'NIFTY PSU BANK', 'NIFTY REALTY', 'NIFTY COMMODITIES', 'NIFTY CPSE', 'NIFTY ENERGY',
            'NIFTY100 ESG', 'NIFTY100 ENHANCED ESG', 'NIFTY INDIA CONSUMPTION', 'NIFTY INFRASTRUCTURE',
            'NIFTY MIDCAP LIQUID 15', 'NIFTY MNC', 'NIFTY PSE', 'NIFTY SME EMERGE', 'NIFTY SERVICES SECTOR',
            'NIFTY SHARIAH 25', 'NIFTY100 LIQUID 15', 'NIFTY50 SHARIAH', 'NIFTY500 SHARIAH', 'NIFTY ADITYA BIRLA GROUP',
            'NIFTY MAHINDRA GROUP', 'NIFTY TATA GROUP', 'NIFTY TATA GROUP 25% CAP', 'NIFTY500 VALUE 50',
            'NIFTY ALPHA LOW-VOLATILITY 30', 'NIFTY QUALITY LOW-VOLATILITY 30', 'NIFTY ALPHA QUALITY LOW-VOLATILITY 30',
            'NIFTY ALPHA QUALITY VALUE LOW-VOLATILITY 30', 'NIFTY50 EQUAL WEIGHT', 'NIFTY100 EQUAL WEIGHT',
            'NIFTY100 LOW VOLATILITY 30', 'NIFTY DIVIDEND OPPORTUNITIES 50', 'NIFTY100 ALPHA 30', 'NIFTY ALPHA 50',
            'NIFTY HIGH BETA 50', 'NIFTY LOW VOLATILITY 50', 'NIFTY200 QUALITY 30', 'NIFTY100 QUALITY 30',
            'NIFTY50 VALUE 20', 'NIFTY GROWTH SECTORS 15', 'NIFTY AAA ULTRA LONG-TERM CORPORATE BOND',
            'Nifty 1D Rate Index']


def get_headers():
    return {
        "Host": "www1.nseindia.com",
        "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0",
        "Accept": "*/*",
        "Accept-Language": "en-US,en;q=0.5",
        "Accept-Encoding": "gzip, deflate, br",
        "X-Requested-With": "XMLHttpRequest",
        "Referer": "https://www1.nseindia.com/products/content/equities/equities/eq_security.htm",
        "Access-Control-Allow-Origin": "*",
        "Access-Control-Allow-Methods": "GET,POST,PUT,DELETE,OPTIONS",
        "Access-Control-Allow-Headers": "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With",
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    }


def get_adjusted_headers():
    return {
        'Host': 'www1.nseindia.com',
        'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0',
        'Accept': '*/*',
        'Accept-Language': 'en-US,en;q=0.5',
        'Accept-Encoding': 'gzip, deflate, br',
        'X-Requested-With': 'XMLHttpRequest',
        'DNT': '1',
        'Connection': 'keep-alive',
    }


def get_symbol_mapping_url():
    return 'https://www1.nseindia.com/products/dynaContent/common/productsSymbolMapping.jsp'


def get_company_events_url():
    return 'https://www1.nseindia.com/corporates/corpInfo/equities/getCorpActions.jsp?symbol='


def get_symbol_count_url():
    return 'https://www1.nseindia.com/marketinfo/sym_map/symbolCount.jsp?symbol='


def get_historical_index_url():
    return 'https://www1.nseindia.com/products/dynaContent/equities/indices/historicalindices.jsp'


def get_tri_index_url():
    return 'https://www1.nseindia.com/products/dynaContent/equities/indices/total_returnindices.jsp'

Functions

def get_adjusted_headers()
Expand source code
def get_adjusted_headers():
    return {
        'Host': 'www1.nseindia.com',
        'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0',
        'Accept': '*/*',
        'Accept-Language': 'en-US,en;q=0.5',
        'Accept-Encoding': 'gzip, deflate, br',
        'X-Requested-With': 'XMLHttpRequest',
        'DNT': '1',
        'Connection': 'keep-alive',
    }
def get_common_names_indices()
Expand source code
def get_common_names_indices():
    return ["NIFTY 50", "NIFTY Next 50", "NIFTY Midcap Liquid 15", "NIFTY 100", "NIFTY 200", "NIFTY 500",
            "NIFTY Midcap 150", "NIFTY Midcap 50", "NIFTY Full Midcap 100", "NIFTY Midcap 100", "NIFTY Smallcap 250",
            "NIFTY Smallcap 50", "NIFTY Full Smallcap 100", "NIFTY Smallcap 100", "NIFTY LargeMidcap 250",
            "NIFTY MidSmallcap 400", "NIFTY Auto", "NIFTY Bank", "NIFTY Financial Services", "NIFTY FMCG", "NIFTY IT",
            "NIFTY Media", "NIFTY Metal", "NIFTY Pharma", "NIFTY Private Bank", "NIFTY PSU Bank", "NIFTY Realty",
            "NIFTY Commodities", "NIFTY India Consumption", "NIFTY CPSE", "NIFTY Energy", "NIFTY100 ESG",
            "NIFTY100 Enhanced ESG", "NIFTY Infra", "NIFTY MNC", "NIFTY PSE", "NIFTY SME EMERGE",
            "NIFTY Services Sector", "NIFTY Shariah 25", "NIFTY50 Shariah", "NIFTY500 Shariah",
            "NIFTY Aditya Birla Group", "NIFTY Mahindra Group", "NIFTY Tata Group", "NIFTY Tata Group 25% Cap",
            "NIFTY100 LIQ 15", "NIFTY Midcap Liquid 15", "NIFTY500 Value 50", "NIFTY Alpha Low-Volatility 30",
            "NIFTY Quality Low-Volatility 30", "NIFTY Alpha Quality Low-Volatility 30",
            "NIFTY Alpha Quality Value Low-Volatility 30", "NIFTY50 Equal Weight", "NIFTY100 Equal Weight",
            "NIFTY100 Low Volatility 30", "NIFTY50 USD", "NIFTY50 Dividend Points", "NIFTY Dividend Opportunities 50",
            "NIFTY100 Alpha 30", "NIFTY Alpha 50", "NIFTY 50 Arbitrage", "NIFTY 50 Futures Index",
            "NIFTY 50 Futures TR Index", "NIFTY High Beta 50", "NIFTY Low Volatility 50", "NIFTY200 Quality 30",
            "NIFTY100 Quality 30", "NIFTY50 Value 20", "NIFTY Growth Sectors 15", "NIFTY50 TR 2X Leverage",
            "NIFTY50 PR 2X Leverage", "NIFTY50 TR 1X Inverse", "NIFTY50 PR 1X Inverse", "NIFTY Composite G-sec Index",
            "NIFTY 4-8 yr G-Sec Index", "NIFTY 8-13 yr G-Sec", "NIFTY 10 yr Benchmark G-Sec",
            "NIFTY 10 yr Benchmark G-Sec (Clean Price)", "NIFTY 11-15 yr G-Sec Index",
            "NIFTY 15 yr and above G-Sec Index", "NIFTY 10 Year SDL Index", "NIFTY AAA Corporate Bond",
            "NIFTY AAA Ultra Short-Term Corporate Bond", "NIFTY AAA Short-Term Corporate Bond",
            "NIFTY AAA Medium-Term Corporate Bond", "NIFTY AAA Long-Term Corporate Bond",
            "NIFTY AAA Ultra Long-Term Corporate Bond", "Nifty 1D Rate Index", 'NIFTY 50', 'NIFTY Next 50', 'NIFTY 100',
            'NIFTY 200', 'NIFTY 500', 'NIFTY Midcap 150', 'NIFTY Midcap 50', 'NIFTY Full Midcap 100',
            'NIFTY Midcap 100', 'NIFTY Smallcap 250', 'NIFTY Smallcap 50', 'NIFTY Full Smallcap 100',
            'NIFTY Smallcap 100', 'NIFTY LargeMidcap 250', 'NIFTY MidSmallcap 400', 'NIFTY Auto', 'NIFTY Bank',
            'NIFTY Financial Services', 'NIFTY FMCG', 'NIFTY IT', 'NIFTY Media', 'NIFTY Metal', 'NIFTY Pharma',
            'NIFTY Private Bank', 'NIFTY PSU Bank', 'NIFTY Realty', 'NIFTY Commodities', 'NIFTY CPSE', 'NIFTY Energy',
            'NIFTY100 ESG', 'NIFTY100 Enhanced ESG', 'NIFTY India Consumption', 'NIFTY Infrastructure',
            'NIFTY Midcap Liquid 15', 'NIFTY MNC', 'NIFTY PSE', 'NIFTY SME EMERGE', 'NIFTY Services Sector',
            'NIFTY Shariah 25', 'NIFTY100 Liquid 15', 'NIFTY50 Shariah', 'NIFTY500 Shariah', 'NIFTY Aditya Birla Group',
            'NIFTY Mahindra Group', 'NIFTY Tata Group', 'NIFTY Tata Group 25% Cap', 'NIFTY500 Value 50',
            'NIFTY Alpha Low-Volatility 30', 'NIFTY Quality Low-Volatility 30', 'NIFTY Alpha Quality Low-Volatility 30',
            'NIFTY Alpha Quality Value Low-Volatility 30', 'NIFTY50 Equal Weight', 'NIFTY100 Equal Weight',
            'NIFTY100 Low Volatility 30', 'NIFTY Dividend Opportunities 50', 'NIFTY100 Alpha 30', 'NIFTY Alpha 50',
            'NIFTY High Beta 50', 'NIFTY Low Volatility 50', 'NIFTY200 Quality 30', 'NIFTY100 Quality 30',
            'NIFTY50 Value 20', 'NIFTY Growth Sectors 15']
def get_company_events_url()
Expand source code
def get_company_events_url():
    return 'https://www1.nseindia.com/corporates/corpInfo/equities/getCorpActions.jsp?symbol='
def get_formatted_names_indices()
Expand source code
def get_formatted_names_indices():
    return ['NIFTY 50', 'NIFTY NEXT 50', 'NIFTY MID LIQ 15', 'NIFTY 100', 'NIFTY 200', 'NIFTY 500', 'NIFTY MIDCAP 150',
            'NIFTY MIDCAP 50', 'NIFTY FULL MIDCAP 100', 'NIFTY MIDCAP 100', 'NIFTY SMALLCAP 250', 'NIFTY SMALLCAP 50',
            'NIFTY FULL SMALLCAP 100', 'NIFTY SMLCAP 100', 'NIFTY LargeMidcap 250', 'NIFTY MIDSMALLCAP 400',
            'NIFTY AUTO',
            'NIFTY BANK', 'NIFTY FIN SERVICE', 'NIFTY FMCG', 'NIFTY IT', 'NIFTY MEDIA', 'NIFTY METAL', 'NIFTY PHARMA',
            'NIFTY PVT BANK', 'NIFTY PSU BANK', 'NIFTY REALTY', 'NIFTY COMMODITIES', 'NIFTY CONSUMPTION', 'NIFTY CPSE',
            'NIFTY ENERGY', 'NIFTY100 ESG', 'NIFTY100 Enhanced ESG', 'NIFTY INFRA', 'NIFTY MNC', 'NIFTY PSE',
            'NIFTY SME EMERGE', 'NIFTY SERV SECTOR', 'NIFTY SHARIAH 25', 'NIFTY50 SHARIAH', 'NIFTY500 SHARIAH',
            'NIFTY ADITYA BIRLA GROUP', 'NIFTY MAHINDRA GROUP', 'NIFTY TATA GROUP', 'NIFTY TATA GROUP 25% CAP',
            'NIFTY100 LIQ 15', 'NIFTY MID LIQ 15', 'NIFTY500 VALUE 50', 'NIFTY ALPHA LOW-VOLATILITY 30',
            'NIFTY QUALITY LOW-VOLATILITY 30', 'NIFTY ALPHA QUALITY LOW-VOLATILITY 30',
            'NIFTY ALPHA QUALITY VALUE LOW-VOLATILITY 30', 'NIFTY50 EQL WGT', 'NIFTY100 EQL WGT', 'NIFTY100 LOWVOL30',
            'NIFTY50 USD', 'NIFTY50 DIV POINT', 'NIFTY DIV OPPS 50', 'NIFTY100 ALPHA 30', 'NIFTY ALPHA 50',
            'NIFTY 50 ARBITRAGE', 'NIFTY 50 FUTURES INDEX', 'NIFTY 50 FUTURES TR INDEX', 'NIFTY HIGH BETA 50',
            'NIFTY LOW VOLATILITY 50', 'NIFTY200 QUALITY 30', 'NIFTY100 Quality 30', 'NIFTY50 VALUE 20',
            'NIFTY GROWSECT 15',
            'NIFTY50 TR 2X LEV', 'NIFTY50 PR 2X LEV', 'NIFTY50 TR 1X INV', 'NIFTY50 PR 1X INV', 'NIFTY GS COMPSITE',
            'NIFTY GS 4 8YR', 'NIFTY GS 8 13YR', 'NIFTY GS 10YR', 'NIFTY GS 10YR CLN', 'NIFTY GS 11 15YR',
            'NIFTY GS 15YRPLUS', 'NIFTY 10 YEAR SDL INDEX', 'NIFTY AAA CORPORATE BOND',
            'NIFTY AAA ULTRA SHORT-TERM CORPORATE BOND', 'NIFTY AAA SHORT-TERM CORPORATE BOND',
            'NIFTY AAA MEDIUM-TERM CORPORATE BOND', 'NIFTY AAA LONG-TERM CORPORATE BOND', 'NIFTY 50', 'NIFTY NEXT 50',
            'NIFTY 100', 'NIFTY 200', 'NIFTY 500', 'NIFTY MIDCAP 150', 'NIFTY MIDCAP 50', 'NIFTY FULL MIDCAP 100',
            'NIFTY MIDCAP 100', 'NIFTY SMALLCAP 250', 'NIFTY SMALLCAP 50', 'NIFTY FULL SMALLCAP 100',
            'NIFTY SMALLCAP 100', 'NIFTY LARGEMIDCAP 250', 'NIFTY MIDSMALLCAP 400', 'NIFTY AUTO', 'NIFTY BANK',
            'NIFTY FINANCIAL SERVICES', 'NIFTY FMCG', 'NIFTY IT', 'NIFTY MEDIA', 'NIFTY METAL', 'NIFTY PHARMA',
            'NIFTY PRIVATE BANK', 'NIFTY PSU BANK', 'NIFTY REALTY', 'NIFTY COMMODITIES', 'NIFTY CPSE', 'NIFTY ENERGY',
            'NIFTY100 ESG', 'NIFTY100 ENHANCED ESG', 'NIFTY INDIA CONSUMPTION', 'NIFTY INFRASTRUCTURE',
            'NIFTY MIDCAP LIQUID 15', 'NIFTY MNC', 'NIFTY PSE', 'NIFTY SME EMERGE', 'NIFTY SERVICES SECTOR',
            'NIFTY SHARIAH 25', 'NIFTY100 LIQUID 15', 'NIFTY50 SHARIAH', 'NIFTY500 SHARIAH', 'NIFTY ADITYA BIRLA GROUP',
            'NIFTY MAHINDRA GROUP', 'NIFTY TATA GROUP', 'NIFTY TATA GROUP 25% CAP', 'NIFTY500 VALUE 50',
            'NIFTY ALPHA LOW-VOLATILITY 30', 'NIFTY QUALITY LOW-VOLATILITY 30', 'NIFTY ALPHA QUALITY LOW-VOLATILITY 30',
            'NIFTY ALPHA QUALITY VALUE LOW-VOLATILITY 30', 'NIFTY50 EQUAL WEIGHT', 'NIFTY100 EQUAL WEIGHT',
            'NIFTY100 LOW VOLATILITY 30', 'NIFTY DIVIDEND OPPORTUNITIES 50', 'NIFTY100 ALPHA 30', 'NIFTY ALPHA 50',
            'NIFTY HIGH BETA 50', 'NIFTY LOW VOLATILITY 50', 'NIFTY200 QUALITY 30', 'NIFTY100 QUALITY 30',
            'NIFTY50 VALUE 20', 'NIFTY GROWTH SECTORS 15', 'NIFTY AAA ULTRA LONG-TERM CORPORATE BOND',
            'Nifty 1D Rate Index']
def get_headers()
Expand source code
def get_headers():
    return {
        "Host": "www1.nseindia.com",
        "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0",
        "Accept": "*/*",
        "Accept-Language": "en-US,en;q=0.5",
        "Accept-Encoding": "gzip, deflate, br",
        "X-Requested-With": "XMLHttpRequest",
        "Referer": "https://www1.nseindia.com/products/content/equities/equities/eq_security.htm",
        "Access-Control-Allow-Origin": "*",
        "Access-Control-Allow-Methods": "GET,POST,PUT,DELETE,OPTIONS",
        "Access-Control-Allow-Headers": "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With",
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    }
def get_historical_index_url()
Expand source code
def get_historical_index_url():
    return 'https://www1.nseindia.com/products/dynaContent/equities/indices/historicalindices.jsp'
def get_symbol_count_url()
Expand source code
def get_symbol_count_url():
    return 'https://www1.nseindia.com/marketinfo/sym_map/symbolCount.jsp?symbol='
def get_symbol_mapping_url()
Expand source code
def get_symbol_mapping_url():
    return 'https://www1.nseindia.com/products/dynaContent/common/productsSymbolMapping.jsp'
def get_tri_index_url()
Expand source code
def get_tri_index_url():
    return 'https://www1.nseindia.com/products/dynaContent/equities/indices/total_returnindices.jsp'