Skip to content

Latest commit

Β 

History

112 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ˆ NSE Data Downloader

Automated NIFTY 500, FnO, & Market Indices Data Downloader

Python 3.8+ License: MIT Platform Downloads

A powerful desktop application to automatically download NIFTY 500, Market Indices, and 15+ Critical NSE Reports including Bhavcopies, FnO Stats, Option Chain, and Bulk/Block Deals. Features scheduled automation, smart file management, and weekend-aware scheduling.


πŸ“₯ Quick Download (No Python Needed!)

🎯 Ready-to-Use Windows Executable

Latest Version: v5.6 | Size: ~22 MB | Platform: Windows 10/11

Download EXE

Direct Download URL:

https://github.com/Avisav24/NSE_Data_Downloader/raw/main/releases/NSE_Data_Downloader.exe

Or browse the releases folder for all versions



✨ What's New

πŸš€ v5.6 Highlights

  • OI Spurts Integration: OI Spurts has been moved into the core default downloads. It now downloads simultaneously with NIFTY 50 and others, completely removing the need for a separate scheduling configuration.
  • Removed Manual Option Chain Button: Simplified the user interface by removing the redundant manual "Download Option Chain Now" button.

πŸš€ v5.5 Highlights

  • Multiple OI Spurts Times: You can now schedule multiple specific times for OI Spurts downloads (e.g. 15:30, 15:45).
  • Clean Option Chain Naming: If the spot price cannot be determined (is 0), the filename now cleanly omits the spot_0_at_ portion (e.g., Option_Chain_1530m.csv).

πŸš€ v5.4 Highlights

  • m Time Suffix for Option Chain: Option chain filenames now use m instead of min for the time suffix (e.g. at_1101m.csv) for concise naming, while keeping the rest identical.

πŸš€ v5.3 Highlights

  • Progress Bar Fix: After enabling Auto Mode or starting the Scheduler, the progress bar no longer jumps to 100% (full). It now correctly stays at 0% (idle) while waiting for the next scheduled download, and only fills during an active download.

πŸš€ v5.2 Highlights

  • Live Nifty Spot in Filename: Option Chain file is now automatically named with the real Nifty 50 spot price at download time (e.g., Option_Chain_100726_spot_24182-1310min.csv). Spot price is read directly from the MarketIndices CSV β€” no DOM scraping, always accurate.
  • min Time Suffix: All downloaded files now include a min suffix in the time portion (e.g., -1310min) for clarity.
  • Consistent File Paths: Fixed a path normalization bug where files could land in inconsistent folders depending on how the download path was passed internally.
  • Robust Background Downloads: Added global folder monitoring so that headless Chrome Data-URI downloads are caught instantly, eliminating timeouts.

πŸš€ v5.1 Highlights

  • Clean Live Time Naming: Unified the naming convention for NIFTY 50, NIFTY 500, Market Indices, and Option Chain. All files now use a clean time suffix, and Option Chain seamlessly includes the live spot price.
  • Robust Background Downloads: Added global folder monitoring so that headless Chrome Data-URI downloads are caught instantly, eliminating timeouts.

πŸš€ v5.0 Highlights

  • Unified Auto-Scheduling: A single, clean "Schedule Times" dashboard section now controls the exact times (e.g., 09:30, 12:00, 15:30) for downloading NIFTY 50, NIFTY 500, Market Indices, and Option Chain simultaneously.
  • Option Chain as Default: Option Chain has been moved out of the optional downloads list and is now a core default download, tracking seamlessly with the main progress bar.
  • Ultra-Compact Resizable UI: The entire layout has been massively compressed to fit natively on smaller laptop screens (starts at 750x580). Features a fully responsive scrollable fallback so you can shrink the window as much as you want without cutting off any buttons or options.
  • Unified Progress Tracking: Both Default and Optional download progress bars have been cleanly grouped into a single unified "Downloads Progress" section.
  • CustomTkinter UI Overhaul (v5.0): Completely redesigned the interface using Apple-inspired aesthetics. Features 50px pill-shaped rounded corners, dark mode support, smooth progress bars, and a modern museum-gallery layout.
  • NIFTY 50 Support: Added dedicated download pipeline for NIFTY 50 index data as a core default alongside NIFTY 500.
  • Improved Settings Tab: Restored the intuitive "Download Locations" setting allowing you to pick custom paths for each file source.
  • Dynamic File Processing: Automatically categorizes files by date and time to prevent overwriting.

πŸ“Š Expanded Data Suite

NEW! Now supports 16+ reports from NSE & BSE!

βœ… FnO: OI Spurts, Participant Vol/OI, FII Stats, Option Chain CSV βœ… Equities: Bulk/Block Deals, 52 Wk High/Low
βœ… Archives: Daily Bhavcopies (CM & FO) βœ… Corporate Filings: Corporates PIT (CSV) βœ… BSE: Cash Market Bhavcopy (NEW!)

πŸ€– Enhanced Auto Mode

UPDATED! Set it and forget it!

βœ… Multiple Schedule Times (comma-separated) βœ… Auto-start scheduler (8 AM - 8 PM)
βœ… Handles multiple download sources
βœ… State persists across restarts
βœ… Perfect for Windows startup

🎯 Core Features

πŸ“ˆ Comprehensive Data Downloads

  • Derivatives: Combined OI, Participant OI/Vol, FII Stats
  • Capital Market: NIFTY 500, PE Details, Bulk/Block Deals
  • Bhavcopies: Full CM & FO Bhavcopies (ZIP/CSV)

πŸ—“οΈ Weekend Detection

  • Auto-skips Saturday & Sunday
  • Market-aware scheduling
  • Manual override available

🏷️ Enhanced File Naming

  • Format: {ReportName}_ddmmyy-hhmmmin.csv
  • Duplicate auto-increment protection
  • Redesigned interface for multiple sources
  • Wide path fields
  • Professional design

⚑ Smart Features

  • Hidden browser mode (Headless)
  • ChromeDriver auto-update
  • Session management for Archives
  • Error recovery

πŸ“‹ Supported Data Reports

The application now fetches the following reports automatically:

Category Report Type
Derivatives (FnO) β€’ OI Spurts (By Underlying)
β€’ Combined OI (Archive)
β€’ Participant Volume & OI
β€’ FII Statistics
β€’ FO Bhavcopy (ZIP)
Capital Market β€’ NIFTY 500 Data
β€’ Bulk Deals & Block Deals
β€’ 52 Week High/Low
β€’ Security Bhavdata (Full)
β€’ CM Bhavcopy (ZIP)
Indices/Others β€’ Indices Close All
β€’ PE Details
β€’ Corporates PIT
β€’ Option Chain CSV

πŸš€ Installation Options

Method Best For Platform Setup Time
Windows EXE πŸ“¦ End users, Startup apps Windows 10/11 1 min
Python Script Developers, Mac/Linux All platforms 5 min

🎯 All Features

πŸ“¦ Core Capabilities

Feature Description
πŸ“₯ Multi-Source Downloads Download from 15+ NSE endpoints simultaneously
πŸ“… Weekend-Aware Scheduling Auto-skips Saturday & Sunday (market closed)
πŸ“‚ Smart Organization Files are sorted into relevant folders automatically
πŸ”‡ Hidden Browser Mode Completely background operation - no visible window
πŸ“Š Real-time Progress Feedback on which report is currently downloading
⏰ Multiple Schedule Times Set unlimited times (e.g., 09:30, 15:30)
🎯 Manual Download Instant downloads with a single click (works any day)
πŸ€– Auto Mode Auto-start scheduler during business hours (8 AM - 8 PM)
Feature Description
--------- -------------
πŸ“₯ Multi-Source Downloads Download from 15+ NSE endpoints simultaneously
πŸ“… Weekend-Aware Scheduling Auto-skips Saturday & Sunday (market closed)
πŸ“‚ Smart Organization Files are sorted into relevant folders automatically
πŸ”‡ Hidden Browser Mode Completely background operation - no visible window
πŸ“Š Real-time Progress Feedback on which report is currently downloading
⏰ Multiple Schedule Times Set unlimited times (e.g., 09:30, 15:30)
🎯 Manual Download Instant downloads with a single click (works any day)
πŸ€– Auto Mode Auto-start scheduler during business hours (8 AM - 8 PM)

🧠 Smart Features

File Naming Format: {ReportType}_ddmmyy-hhmmmin.ext

Examples:
βœ“ OI_Spurts_101025-1425min.csv
βœ“ FII_Stats_101025-1530min.xls
βœ“ BhavCopy_CM_101025-1600min.zip
  • βœ… Smart Download Detection - Waits for completion (file size stability check)
  • βœ… Archive Handling - Automatically handles ZIP and CSV formats
  • βœ… Duplicate Handling - Auto-increments filename (_1, _2, etc.)
  • βœ… Session Management - Bypasses NSE security for archives and API
  • βœ… Error Recovery - Robust ChromeDriver handling with auto-fallback

πŸ’» Python Installation

For developers and advanced users who want to customize the code

πŸ“‹ Requirements

  • Scheduled Downloads: Automatic daily downloads at your configured times (Monday-Friday only)
  • Manual Download: Download data instantly any day with a single click
  • Custom Download Locations: Choose separate paths for each data source

Smart Features

  • Enhanced File Naming: New format {source}_ddmmyy-hhmmmin.csv
    • Example: NIFTY500_031025-1425min.csv (Oct 3, 2025 at 2:25 PM)
    • Example: MarketIndices_031025-1425min.csv
  • Smart Download Detection: Waits for download to complete (checks file size stability)
  • Multi-Location Search: Automatically checks both configured and default Downloads folders
  • Duplicate Handling: Auto-increments filename if downloading multiple times in same minute
  • Session Management: Bypasses NSE security by establishing proper session for each source
  • Error Recovery: Robust ChromeDriver handling with automatic fallback
  • CDP Download Control: Dynamically sets download path for each source

User Experience

  • Compact GUI (680Γ—450px): Efficient use of screen space
  • Wide Path Fields: View full file paths (48 characters)
  • Progress Percentage Display: Shows [37%] Button clicked! Initiating download...
  • Comprehensive Logging: All operations logged in nse_downloader.log
  • Background Operation: Downloads run in headless mode (no visible browser)
  • Startup App Ready: Perfect for Windows startup with weekend auto-skip
  • User-Friendly Interface: Easy-to-use graphical interface with clear labels

πŸ“‹ Requirements

For Executable (Windows)

  • Windows 10 or 11 (64-bit)
  • Google Chrome browser installed
  • Internet connection

For Python Version

  • Python 3.8 or higher
  • Google Chrome browser installed
  • Internet connection
  • Windows/Linux/Mac OS

πŸš€ Installation

Option 1: Download Executable (Recommended for Windows)

  1. Download NSE_Data_Downloader.exe
  2. Double-click NSE_Data_Downloader.exe
  3. That's it! No installation needed.

Option 2: Run from Source (All Platforms)

  1. Clone the Repository:

    git clone https://github.com/Avisav24/NSE_Data_Downloader.git
    cd NSE_Data_Downloader
  2. Install Python Dependencies:

    pip install -r requirements.txt

πŸ’» Usage

Quick Start

  1. Run the Application:

    python nse_downloader.py
  2. Configure Settings:

    • Download Locations: Click "Browse" to select save locations.
    • Auto Mode: Check "Auto Mode" to enable automatic scheduler activation on startup.
    • Schedule Times: Enter times in 24-hour format (e.g., 15:35, 17:00).
    • Note: Scheduled downloads only run Monday-Friday.
  3. Start Scheduler:

    • Click "Start Scheduler"
    • Downloads occur automatically at configured times.
  4. Manual Download:

    • Click "Download Now" for immediate download of ALL configured reports.

βš™οΈ Configuration

Settings are automatically saved in config.json. The downloader now manages multiple endpoints dynamically.

πŸ“Š How It Works

Download Process (Multi-Source)

  1. Session Initialization: Establishes a valid session with NSE India homepage to get cookies.
  2. Sequential Downloading: Iterates through the list of 14+ configured URLs (Spurts, PE, Vol, Bhavcopies, etc.).
  3. Smart Navigation: Uses specific API endpoints or Archive URLs based on the report type.
  4. File Processing:
    • Verifies download completion.
    • Renames files with timestamp and source prefix.
    • Moves files to their specific folders (e.g., NSE_Data/FnO, NSE_Data/Bhavcopy).

Weekend Detection

  • Checks current day before scheduled downloads.
  • Logs: "It's Saturday - Market is closed. Skipping."

πŸ“ Logging

All activities are logged in nse_downloader.log:

  • Download start/completion times for each report type.
  • File rename operations.
  • Errors (e.g., if a specific report is not yet generated by NSE for the day).

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Disclaimer

This tool is for educational and personal use only. Please respect NSE India's terms of service and use responsibly. Do not use this tool for commercial purposes or excessive automated requests.


Repository: https://github.com/Avisav24/NSE_Data_Downloader
Last Updated: January 31, 2026

About

Automates daily downloads of NIFTY 500 and Market Indices CSV files from NSE India with scheduled times πŸ“†, runs smoothly in the background πŸ•΅οΈβ€β™‚οΈ, and saves files smartly with timestampsβ€”ideal for traders and analysts seeking instant, hassle-free market data access ⚑.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages