# ============================================================
# F&O Stock Universe for Zone Scanner
# Version: v0.1.2
# Date: 2026-10-02
# ------------------------------------------------------------
# Corrected tickers — verified working on yfinance (Oct 2026).
# Reflects all major corporate actions: demergers, mergers,
# and rebranding as of this date.
# Price filter applied at runtime.
# ============================================================

FNO_STOCKS = [
    # --- Nifty 50 ---
    {"symbol": "HDFCBANK.NS",    "name": "HDFC Bank",           "sector": "Banks"},
    {"symbol": "RELIANCE.NS",    "name": "Reliance",            "sector": "Energy"},
    {"symbol": "ICICIBANK.NS",   "name": "ICICI Bank",          "sector": "Banks"},
    {"symbol": "INFY.NS",        "name": "Infosys",             "sector": "IT"},
    {"symbol": "TCS.NS",         "name": "TCS",                 "sector": "IT"},
    {"symbol": "ITC.NS",         "name": "ITC",                 "sector": "FMCG"},
    {"symbol": "LT.NS",          "name": "L&T",                 "sector": "Infra"},
    {"symbol": "SBIN.NS",        "name": "SBI",                 "sector": "Banks"},
    {"symbol": "BHARTIARTL.NS",  "name": "Bharti Airtel",       "sector": "Telecom"},
    {"symbol": "AXISBANK.NS",    "name": "Axis Bank",           "sector": "Banks"},
    {"symbol": "KOTAKBANK.NS",   "name": "Kotak Mahindra",      "sector": "Banks"},
    {"symbol": "HINDUNILVR.NS",  "name": "HUL",                 "sector": "FMCG"},
    {"symbol": "BAJFINANCE.NS",  "name": "Bajaj Finance",       "sector": "NBFC"},
    {"symbol": "MARUTI.NS",      "name": "Maruti Suzuki",       "sector": "Auto"},
    {"symbol": "ASIANPAINT.NS",  "name": "Asian Paints",        "sector": "Paints"},
    {"symbol": "M&M.NS",         "name": "M&M",                 "sector": "Auto"},
    {"symbol": "SUNPHARMA.NS",   "name": "Sun Pharma",          "sector": "Pharma"},
    {"symbol": "HCLTECH.NS",     "name": "HCL Tech",            "sector": "IT"},
    {"symbol": "TITAN.NS",       "name": "Titan",               "sector": "Consumer"},
    {"symbol": "ULTRACEMCO.NS",  "name": "UltraTech Cement",    "sector": "Cement"},
    {"symbol": "WIPRO.NS",       "name": "Wipro",               "sector": "IT"},
    {"symbol": "ADANIENT.NS",    "name": "Adani Enterprises",   "sector": "Conglomerate"},
    {"symbol": "NTPC.NS",        "name": "NTPC",                "sector": "Power"},
    {"symbol": "BAJAJ-AUTO.NS",  "name": "Bajaj Auto",          "sector": "Auto"},
    {"symbol": "POWERGRID.NS",   "name": "Power Grid",          "sector": "Power"},
    {"symbol": "TATASTEEL.NS",   "name": "Tata Steel",          "sector": "Metals"},
    {"symbol": "JSWSTEEL.NS",    "name": "JSW Steel",           "sector": "Metals"},
    {"symbol": "HINDALCO.NS",    "name": "Hindalco",            "sector": "Metals"},
    {"symbol": "COALINDIA.NS",   "name": "Coal India",          "sector": "Mining"},
    {"symbol": "ONGC.NS",        "name": "ONGC",                "sector": "Energy"},
    {"symbol": "BPCL.NS",        "name": "BPCL",                "sector": "Energy"},
    {"symbol": "IOC.NS",         "name": "IOC",                 "sector": "Energy"},
    {"symbol": "GRASIM.NS",      "name": "Grasim",              "sector": "Cement"},
    {"symbol": "SHREECEM.NS",    "name": "Shree Cement",        "sector": "Cement"},
    {"symbol": "AMBUJACEM.NS",   "name": "Ambuja Cements",      "sector": "Cement"},
    {"symbol": "DRREDDY.NS",     "name": "Dr Reddy's",          "sector": "Pharma"},
    {"symbol": "CIPLA.NS",       "name": "Cipla",               "sector": "Pharma"},
    {"symbol": "DIVISLAB.NS",    "name": "Divi's Labs",         "sector": "Pharma"},
    {"symbol": "APOLLOHOSP.NS",  "name": "Apollo Hospitals",    "sector": "Healthcare"},
    {"symbol": "NESTLEIND.NS",   "name": "Nestle India",        "sector": "FMCG"},
    {"symbol": "BRITANNIA.NS",   "name": "Britannia",           "sector": "FMCG"},
    {"symbol": "TATACONSUM.NS",  "name": "Tata Consumer",       "sector": "FMCG"},
    {"symbol": "EICHERMOT.NS",   "name": "Eicher Motors",       "sector": "Auto"},
    {"symbol": "HEROMOTOCO.NS",  "name": "Hero MotoCorp",       "sector": "Auto"},
    {"symbol": "BAJAJFINSV.NS",  "name": "Bajaj Finserv",       "sector": "NBFC"},
    {"symbol": "INDUSINDBK.NS",  "name": "IndusInd Bank",       "sector": "Banks"},
    {"symbol": "TECHM.NS",       "name": "Tech Mahindra",       "sector": "IT"},
    {"symbol": "LTM.NS",         "name": "LTIMindtree",         "sector": "IT"},
    {"symbol": "ADANIPORTS.NS",  "name": "Adani Ports",         "sector": "Infra"},

    # --- Nifty Next 50 ---
    {"symbol": "ADANIGREEN.NS",  "name": "Adani Green",         "sector": "Energy"},
    {"symbol": "ADANIPOWER.NS",  "name": "Adani Power",         "sector": "Power"},
    {"symbol": "ADANIENSOL.NS",  "name": "Adani Energy Sol",    "sector": "Power"},
    {"symbol": "BANKBARODA.NS",  "name": "Bank of Baroda",      "sector": "Banks"},
    {"symbol": "BERGEPAINT.NS",  "name": "Berger Paints",       "sector": "Paints"},
    {"symbol": "BEL.NS",         "name": "Bharat Electronics",  "sector": "Defence"},
    {"symbol": "BOSCHLTD.NS",    "name": "Bosch",               "sector": "Auto"},
    {"symbol": "CANBK.NS",       "name": "Canara Bank",         "sector": "Banks"},
    {"symbol": "CHOLAFIN.NS",    "name": "Cholamandalam Fin",   "sector": "NBFC"},
    {"symbol": "DABUR.NS",       "name": "Dabur",               "sector": "FMCG"},
    {"symbol": "DALBHARAT.NS",   "name": "Dalmia Bharat",       "sector": "Cement"},
    {"symbol": "DLF.NS",         "name": "DLF",                 "sector": "Realty"},
    {"symbol": "GAIL.NS",        "name": "GAIL",                "sector": "Energy"},
    {"symbol": "GODREJCP.NS",    "name": "Godrej Consumer",     "sector": "FMCG"},
    {"symbol": "HAVELLS.NS",     "name": "Havells",             "sector": "Electricals"},
    {"symbol": "HDFCLIFE.NS",    "name": "HDFC Life",           "sector": "Insurance"},
    {"symbol": "ICICIGI.NS",     "name": "ICICI Lombard",       "sector": "Insurance"},
    {"symbol": "ICICIPRULI.NS",  "name": "ICICI Prudential",    "sector": "Insurance"},
    {"symbol": "INDUSTOWER.NS",  "name": "Indus Towers",        "sector": "Telecom"},
    {"symbol": "IRCTC.NS",       "name": "IRCTC",               "sector": "Travel"},
    {"symbol": "JINDALSTEL.NS",  "name": "Jindal Steel",        "sector": "Metals"},
    {"symbol": "LICI.NS",        "name": "LIC",                 "sector": "Insurance"},
    {"symbol": "LUPIN.NS",       "name": "Lupin",               "sector": "Pharma"},
    {"symbol": "MARICO.NS",      "name": "Marico",              "sector": "FMCG"},
    {"symbol": "MOTHERSON.NS",   "name": "Samvardhana Moth.",   "sector": "Auto"},
    {"symbol": "NAUKRI.NS",      "name": "Info Edge",           "sector": "Internet"},
    {"symbol": "PIIND.NS",       "name": "PI Industries",       "sector": "Chemicals"},
    {"symbol": "PIDILITIND.NS",  "name": "Pidilite",            "sector": "Chemicals"},
    {"symbol": "PNB.NS",         "name": "Punjab National Bank","sector": "Banks"},
    {"symbol": "SBILIFE.NS",     "name": "SBI Life",            "sector": "Insurance"},
    {"symbol": "SIEMENS.NS",     "name": "Siemens",             "sector": "Capital Goods"},
    {"symbol": "SRF.NS",         "name": "SRF",                 "sector": "Chemicals"},
    {"symbol": "TORNTPHARM.NS",  "name": "Torrent Pharma",      "sector": "Pharma"},
    {"symbol": "TRENT.NS",       "name": "Trent",               "sector": "Retail"},
    {"symbol": "VEDL.NS",        "name": "Vedanta",             "sector": "Metals"},
    {"symbol": "ETERNAL.NS",     "name": "Eternal (Zomato)",    "sector": "Internet"},

    # --- Midcap F&O ---
    {"symbol": "ABB.NS",         "name": "ABB India",           "sector": "Capital Goods"},
    {"symbol": "ABCAPITAL.NS",   "name": "Aditya Birla Capital","sector": "NBFC"},
    {"symbol": "ALKEM.NS",       "name": "Alkem Labs",          "sector": "Pharma"},
    {"symbol": "APLAPOLLO.NS",   "name": "APL Apollo",          "sector": "Metals"},
    {"symbol": "ASHOKLEY.NS",    "name": "Ashok Leyland",       "sector": "Auto"},
    {"symbol": "ASTRAL.NS",      "name": "Astral",              "sector": "Pipes"},
    {"symbol": "ATUL.NS",        "name": "Atul",                "sector": "Chemicals"},
    {"symbol": "AUBANK.NS",      "name": "AU Small Finance",    "sector": "Banks"},
    {"symbol": "AUROPHARMA.NS",  "name": "Aurobindo Pharma",    "sector": "Pharma"},
    {"symbol": "BALKRISIND.NS",  "name": "Balkrishna Ind",      "sector": "Auto"},
    {"symbol": "BANDHANBNK.NS",  "name": "Bandhan Bank",        "sector": "Banks"},
    {"symbol": "BATAINDIA.NS",   "name": "Bata India",          "sector": "Consumer"},
    {"symbol": "BHARATFORG.NS",  "name": "Bharat Forge",        "sector": "Auto"},
    {"symbol": "BHEL.NS",        "name": "BHEL",                "sector": "Capital Goods"},
    {"symbol": "BIOCON.NS",      "name": "Biocon",              "sector": "Pharma"},
    {"symbol": "CANFINHOME.NS",  "name": "Can Fin Homes",       "sector": "NBFC"},
    {"symbol": "CHAMBLFERT.NS",  "name": "Chambal Fert",        "sector": "Chemicals"},
    {"symbol": "COFORGE.NS",     "name": "Coforge",             "sector": "IT"},
    {"symbol": "COLPAL.NS",      "name": "Colgate-Palmolive",   "sector": "FMCG"},
    {"symbol": "CONCOR.NS",      "name": "Container Corp",      "sector": "Logistics"},
    {"symbol": "CROMPTON.NS",    "name": "Crompton Greaves",    "sector": "Electricals"},
    {"symbol": "CUB.NS",         "name": "City Union Bank",     "sector": "Banks"},
    {"symbol": "CUMMINSIND.NS",  "name": "Cummins India",       "sector": "Capital Goods"},
    {"symbol": "DEEPAKNTR.NS",   "name": "Deepak Nitrite",      "sector": "Chemicals"},
    {"symbol": "DELHIVERY.NS",   "name": "Delhivery",           "sector": "Logistics"},
    {"symbol": "DMART.NS",       "name": "Avenue Supermarts",   "sector": "Retail"},
    {"symbol": "ESCORTS.NS",     "name": "Escorts Kubota",      "sector": "Auto"},
    {"symbol": "EXIDEIND.NS",    "name": "Exide Industries",    "sector": "Auto"},
    {"symbol": "FEDERALBNK.NS",  "name": "Federal Bank",        "sector": "Banks"},
    {"symbol": "GNFC.NS",        "name": "GNFC",                "sector": "Chemicals"},
    {"symbol": "GODREJPROP.NS",  "name": "Godrej Properties",   "sector": "Realty"},
    {"symbol": "GRANULES.NS",    "name": "Granules India",      "sector": "Pharma"},
    {"symbol": "HAL.NS",         "name": "HAL",                 "sector": "Defence"},
    {"symbol": "HINDPETRO.NS",   "name": "HPCL",                "sector": "Energy"},
    {"symbol": "IDFCFIRSTB.NS",  "name": "IDFC First Bank",     "sector": "Banks"},
    {"symbol": "IEX.NS",         "name": "Indian Energy Exch",  "sector": "Financials"},
    {"symbol": "IGL.NS",         "name": "Indraprastha Gas",    "sector": "Energy"},
    {"symbol": "INDHOTEL.NS",    "name": "Indian Hotels",       "sector": "Hospitality"},
    {"symbol": "INDIGO.NS",      "name": "IndiGo",              "sector": "Aviation"},
    {"symbol": "INDIAMART.NS",   "name": "IndiaMART",           "sector": "Internet"},
    {"symbol": "IPCALAB.NS",     "name": "IPCA Labs",           "sector": "Pharma"},
    {"symbol": "JKCEMENT.NS",    "name": "JK Cement",           "sector": "Cement"},
    {"symbol": "JUBLFOOD.NS",    "name": "Jubilant FoodWorks",  "sector": "Consumer"},
    {"symbol": "KAJARIACER.NS",  "name": "Kajaria Ceramics",    "sector": "Consumer"},
    {"symbol": "KPITTECH.NS",    "name": "KPIT Technologies",   "sector": "IT"},
    {"symbol": "LALPATHLAB.NS",  "name": "Dr Lal PathLabs",     "sector": "Healthcare"},
    {"symbol": "LAURUSLABS.NS",  "name": "Laurus Labs",         "sector": "Pharma"},
    {"symbol": "LICHSGFIN.NS",   "name": "LIC Housing Fin",     "sector": "NBFC"},
    {"symbol": "LTF.NS",         "name": "L&T Finance",         "sector": "NBFC"},
    {"symbol": "LTTS.NS",        "name": "L&T Technology",      "sector": "IT"},
    {"symbol": "MANAPPURAM.NS",  "name": "Manappuram Finance",  "sector": "NBFC"},
    {"symbol": "MAXHEALTH.NS",   "name": "Max Healthcare",      "sector": "Healthcare"},
    {"symbol": "MCX.NS",         "name": "MCX",                 "sector": "Financials"},
    {"symbol": "METROPOLIS.NS",  "name": "Metropolis Health",   "sector": "Healthcare"},
    {"symbol": "MFSL.NS",        "name": "Max Financial",       "sector": "Insurance"},
    {"symbol": "MGL.NS",         "name": "Mahanagar Gas",       "sector": "Energy"},
    {"symbol": "MPHASIS.NS",     "name": "Mphasis",             "sector": "IT"},
    {"symbol": "MRF.NS",         "name": "MRF",                 "sector": "Auto"},
    {"symbol": "MUTHOOTFIN.NS",  "name": "Muthoot Finance",     "sector": "NBFC"},
    {"symbol": "NATIONALUM.NS",  "name": "National Aluminium",  "sector": "Metals"},
    {"symbol": "NAVINFLUOR.NS",  "name": "Navin Fluorine",      "sector": "Chemicals"},
    {"symbol": "NMDC.NS",        "name": "NMDC",                "sector": "Mining"},
    {"symbol": "OBEROIRLTY.NS",  "name": "Oberoi Realty",       "sector": "Realty"},
    {"symbol": "OFSS.NS",        "name": "Oracle Financial",    "sector": "IT"},
    {"symbol": "PAGEIND.NS",     "name": "Page Industries",     "sector": "Consumer"},
    {"symbol": "PERSISTENT.NS",  "name": "Persistent Systems",  "sector": "IT"},
    {"symbol": "PETRONET.NS",    "name": "Petronet LNG",        "sector": "Energy"},
    {"symbol": "PFC.NS",         "name": "Power Finance Corp",  "sector": "NBFC"},
    {"symbol": "POLYCAB.NS",     "name": "Polycab",             "sector": "Electricals"},
    {"symbol": "PVRINOX.NS",     "name": "PVR INOX",            "sector": "Entertainment"},
    {"symbol": "RAMCOCEM.NS",    "name": "Ramco Cements",       "sector": "Cement"},
    {"symbol": "RECLTD.NS",      "name": "REC",                 "sector": "NBFC"},
    {"symbol": "SAIL.NS",        "name": "SAIL",                "sector": "Metals"},
    {"symbol": "SBICARD.NS",     "name": "SBI Cards",           "sector": "NBFC"},
    {"symbol": "SONACOMS.NS",    "name": "Sona Comstar",        "sector": "Auto"},
    {"symbol": "SUNTV.NS",       "name": "Sun TV",              "sector": "Media"},
    {"symbol": "SYNGENE.NS",     "name": "Syngene Intl",        "sector": "Healthcare"},
    {"symbol": "TATACHEM.NS",    "name": "Tata Chemicals",      "sector": "Chemicals"},
    {"symbol": "TATACOMM.NS",    "name": "Tata Communications", "sector": "Telecom"},
    {"symbol": "TATAPOWER.NS",   "name": "Tata Power",          "sector": "Power"},
    {"symbol": "TIINDIA.NS",     "name": "Tube Investments",    "sector": "Auto"},
    {"symbol": "TORNTPOWER.NS",  "name": "Torrent Power",       "sector": "Power"},
    {"symbol": "TVSMOTOR.NS",    "name": "TVS Motor",           "sector": "Auto"},
    {"symbol": "UBL.NS",         "name": "United Breweries",    "sector": "Consumer"},
    {"symbol": "UPL.NS",         "name": "UPL",                 "sector": "Chemicals"},
    {"symbol": "VOLTAS.NS",      "name": "Voltas",              "sector": "Consumer"},
    {"symbol": "ZYDUSLIFE.NS",   "name": "Zydus Lifesciences",  "sector": "Pharma"},

    # --- Recent F&O additions ---
    {"symbol": "POLICYBZR.NS",   "name": "PB Fintech",          "sector": "Internet"},
    {"symbol": "NYKAA.NS",       "name": "FSN E-Commerce",      "sector": "Internet"},
    {"symbol": "PAYTM.NS",       "name": "One97 Communications","sector": "Internet"},
    {"symbol": "JIOFIN.NS",      "name": "Jio Financial",       "sector": "NBFC"},
    {"symbol": "CAMS.NS",        "name": "CAMS",                "sector": "Financials"},
    {"symbol": "IDEA.NS",        "name": "Vodafone Idea",       "sector": "Telecom"},
    {"symbol": "GLENMARK.NS",    "name": "Glenmark Pharma",     "sector": "Pharma"},
    {"symbol": "ABFRL.NS",       "name": "ABFRL",               "sector": "Retail"},
    {"symbol": "HINDCOPPER.NS",  "name": "Hindustan Copper",    "sector": "Metals"},
    {"symbol": "HFCL.NS",        "name": "HFCL",                "sector": "Telecom"},
    {"symbol": "IRFC.NS",        "name": "IRFC",                "sector": "NBFC"},
    {"symbol": "RVNL.NS",        "name": "RVNL",                "sector": "Infra"},
    {"symbol": "SUZLON.NS",      "name": "Suzlon Energy",       "sector": "Energy"},
    {"symbol": "YESBANK.NS",     "name": "Yes Bank",            "sector": "Banks"},
    {"symbol": "PPLPHARMA.NS",   "name": "Piramal Pharma",      "sector": "Pharma"},
    {"symbol": "SHRIRAMFIN.NS",  "name": "Shriram Finance",     "sector": "NBFC"},
    {"symbol": "TMCV.NS",        "name": "Tata Motors (CV)",    "sector": "Auto"},
    {"symbol": "GUJENERGY.NS",   "name": "Gujarat Energy",      "sector": "Energy"},
]

# Price filter bounds (in INR)
MIN_PRICE = 50
MAX_PRICE = 15000

def get_unique_stocks():
    seen = set()
    unique = []
    for s in FNO_STOCKS:
        if s["symbol"] not in seen:
            seen.add(s["symbol"])
            unique.append(s)
    return unique