Skip to main content

A Python-based data downloader for NSE, India

Project description

National Stock Exchange (India) Web-Scraping For getting Required Data

WebSite-Url : https://www.nseindia.com/

gereral.py

That uses NSE private search api for getting id of a stock

example tata moors (Common name) :- TATAMOTORSEQN (ID assigned by NSE)

from general import getId
id = getId('tata motors')

today_all_stock.py

Gives all data of all companies including NIFTY, and you save it as CSV file. getTodayData() returns tuple in the form of (nifty_data, Company_data)

from today_all_stocks import getTodayData
nifty_data, companies_data = getTodayData() 

intra_day.py

if you call the function intraDay(company_id) or nifty_intraDay(nifty_type) to get live data i.e., from 09:00:00 AM to till now

For Companies use like this,

from intra_day import Intra_Day
ID = Intra_Day('TATA MOTORS')
timeStamp, dataPoints = ID.intraDay()

and for NIFTY use,

from intra_day import Intra_Day
ID = Intra_Day('NIFTY 50')
timeStamp, dataPoints = ID.nifty_intraDay()

call nifty_intraday() or intraDay() as many times you need

individual_company_stock.py

This will give you the historical data of that stock. max 3 years

from individual_company_stock import getHistoryData
getHistoryData('SHREECEM',from_date='30-04-2020',to_date='30-04-2021') 
# Default params : from_date = today's date in last year DD-MM-(YYYY-1), to_date=today's date DD-MM-YYYY
# for example today is 30-04-2021; from_date = 30-04-2020 to_date = 30-04-2021
from individual_company_stock import niftyHistoryData
niftyHistoryData('NIFTY 50') 
# Default params : from_date = today's date in last year DD-MM-(YYYY-1), to_date=today's date DD-MM-YYYY
# for example today is 30-04-2021; from_date = 30-04-2020 to_date = 30-04-2021

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

pknsetools-0.1.20250214.138.tar.gz (69.1 kB view details)

Uploaded Source

Built Distributions

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

PKNSETools-0.1.20250214.138-cp312-cp312-win_amd64.whl (86.2 kB view details)

Uploaded CPython 3.12Windows x86-64

PKNSETools-0.1.20250214.138-cp310-cp310-macosx_13_0_arm64.whl (85.8 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

PKNSETools-0.1.20250214.138-cp310-cp310-macosx_10_9_x86_64.whl (85.8 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file pknsetools-0.1.20250214.138.tar.gz.

File metadata

  • Download URL: pknsetools-0.1.20250214.138.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pknsetools-0.1.20250214.138.tar.gz
Algorithm Hash digest
SHA256 f1362bcf52463a63d0a2f5fb723d185fb9ebb513075cca9e8746943c4b1e1abf
MD5 87a5fa47ef902bbffb8deaa198d4ca60
BLAKE2b-256 31e85ff84d321ac8b5163bc2decf7fa06fd65d81867fd53123038f04d3431c0e

See more details on using hashes here.

File details

Details for the file PKNSETools-0.1.20250214.138-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for PKNSETools-0.1.20250214.138-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0f5cd4cff074fe9af2f4387c38393e91c19753c6b2ec191142e5b98b8755f743
MD5 47fafe6409ba239d63f1074607ffb5eb
BLAKE2b-256 9afa3a362c96507d605025657cb8df6a59fb5a04d02ce7c90483a8310a52371f

See more details on using hashes here.

File details

Details for the file PKNSETools-0.1.20250214.138-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for PKNSETools-0.1.20250214.138-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4123f1c87e0ffa08439d36f7c8006eced469fc68615bc64484425e819a861f0f
MD5 0fca8e2afd34b53521acb3db6c80153c
BLAKE2b-256 f6d844112deca14dbf2fc552af9593582682923f6cf61752931e209e7da2032d

See more details on using hashes here.

File details

Details for the file PKNSETools-0.1.20250214.138-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for PKNSETools-0.1.20250214.138-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 630740842d626034423a4284a473a83ba4405228bb4d7fd5843b81846e1a375c
MD5 c916a5c4f2c1da6e3b9c5697064156c6
BLAKE2b-256 14eff6d501b7aa08af2a6351e6ce85a5a7ec5c3901e3140262791d53674ea235

See more details on using hashes here.

File details

Details for the file PKNSETools-0.1.20250214.138-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for PKNSETools-0.1.20250214.138-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e72312e61fa03aabf3839de00e01772f984e54080c884654ff587d2ec67b9fe7
MD5 2a761252c8d8afba8a53fc1059cfdf0b
BLAKE2b-256 ba17d6462620e1f68aec93a8edb654ea6674a2a891fc9db5610cda2d302df31a

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