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.20250213.137.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.20250213.137-cp312-cp312-win_amd64.whl (86.2 kB view details)

Uploaded CPython 3.12Windows x86-64

PKNSETools-0.1.20250213.137-cp310-cp310-macosx_13_0_arm64.whl (85.7 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

PKNSETools-0.1.20250213.137-cp310-cp310-macosx_10_9_x86_64.whl (85.7 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pknsetools-0.1.20250213.137.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.20250213.137.tar.gz
Algorithm Hash digest
SHA256 5002dfc27531368c390e7550c19a3ca4859309dbf99f43479247510cb1f3598f
MD5 23173852d06578b3e6acf76b38567458
BLAKE2b-256 f58420097d43364f0a7a607112d91cdc5d713183e261bbb02fe5fef220eb23ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250213.137-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 638f060bae42ea6dfd837e78dca251b8d11dad7b30efddaea4103911f2f67f8a
MD5 ce9d6f1a996e46e5dc093ac93c972f68
BLAKE2b-256 d207228313857d88776cd36b678d003be53c751332572cf78162269b36c41f6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250213.137-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6ffeaaedeb25e984b25d70e93c65ca379bb99fe169eef421499773fcc097419
MD5 2d7b296d2376223b17824205d777829e
BLAKE2b-256 b088336579cf13f36ddacd1c3e8549f80ae61209678064df395c385f7f6de298

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250213.137-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 546a139e78d2ee2efab2456b6274cbe838ae8d929fbb1b5d6244b915380aeeb7
MD5 9ff708b2ad14e2e0663668f35e26f021
BLAKE2b-256 d127cb996bc7fcf63da23689d8e3ed5eb58a90fed4b72b1b56697b174d17e46e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250213.137-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d93253367bf06e3e943d4ebfb73e00506c905944a93489d541c0c1ccaeb706dd
MD5 10d2cae7f7b7805b268a8f5fd69e04e2
BLAKE2b-256 885fd438ce752f00c87409881af3b8aca006497c24ba5f9bac6986348d6eee12

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