Skip to content

This repository contains Python code to Download Historical Stocks data and Intraday Options data without any cost, Extraction from Zerodha.com

License

Notifications You must be signed in to change notification settings

vikassharma545/Historical-Market-data-From-Zerodha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 PyZData – Market Data Downloader from Zerodha

GitHub repo size GitHub last commit GitHub issues GitHub pull requests GitHub forks GitHub stars

💼 A lightweight, robust Python client to download historical OHLC and Open Interest data from Zerodha using login credentials and TOTP. Built with retry logic, efficient pagination, and developer-friendly design.


🚀 Features

  • ✅ Fetch historical 1-minute to daily data
  • ✅ Supports Open Interest (OI) toggle
  • ✅ Auto handles Zerodha login using user_id + password + TOTP
  • ✅ Easy token lookup via symbol/exchange
  • ✅ Efficient data download month-by-month
  • ✅ Clean Pandas DataFrame output ready for ML/backtesting

🖥️ PyZData EXE for Non-Programmers

For non-programming users, a simple and clean Windows .exe GUI is available for easy data downloading:

🔐 Login Screen

Login GUI

📅 Download Screen

Download GUI

Just open the executable and log in with your Zerodha credentials. Select your symbol, date range, and interval — and click Download Data.


📦 Installation

Install directly from GitHub:

pip install git+https://github.com/vikassharma545/Historical-Market-data-From-Zerodha.git

🧠 Usage

from pyzdata import PyZData, Interval

# Option 1: Login using credentials
client = PyZData(user_id="your_id", password="your_password", totp=123456)

# Option 2: Login using enctoken
# client = PyZData(enctoken="your_enctoken")

# Fetch instrument token for NIFTY
token = client.get_instrument_token("NIFTY 50", "NSE")

# Download 1-minute OHLC + Volume + OI for Jan 2024
df = client.get_data(token, "2024-01-01", "2024-01-31", interval=Interval.MINUTE_1, oi=True, print_logs=True)

print(df.head())

📝 License

This project is licensed under the MIT License.


🙋‍♂️ Author

Developed with ❤️ by Vikas Sharma

About

This repository contains Python code to Download Historical Stocks data and Intraday Options data without any cost, Extraction from Zerodha.com

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages