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.20250131.136.tar.gz (69.0 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.20250131.136-cp312-cp312-win_amd64.whl (86.1 kB view details)

Uploaded CPython 3.12Windows x86-64

PKNSETools-0.1.20250131.136-cp310-cp310-macosx_13_0_arm64.whl (85.6 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

PKNSETools-0.1.20250131.136-cp310-cp310-macosx_10_9_x86_64.whl (85.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pknsetools-0.1.20250131.136.tar.gz
Algorithm Hash digest
SHA256 66d6f096e5440e0287b2f0eb554a9e98e98a4726b9ac1113d318d26952a3dae6
MD5 299528a353a6e89a7dd3b749a9e05b76
BLAKE2b-256 05c18f9e404ee6a4f3b69779372109a804efe3171ad1f9390a73f8fae005553e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250131.136-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 041f9f30cdfd390b0c43e572513797c7d85775a3ed64a7262f275a368e472305
MD5 3e1ec6b1f1df683539f0b67922ad84e9
BLAKE2b-256 bc6bcdb3692c7924637ce61d64fee8339a82ee160bc57f047bf45c303aac3839

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250131.136-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 412573837b6de8bba7bca0f61b57df3ba2bf1941c386fd722f0b8baac7d99f87
MD5 42347eb1dbc382ab2510470b235c60bb
BLAKE2b-256 9bd65e804bc78705f681a36e8ed6d3d9f792f88c41fa0fc363b00e6a91c9e03a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250131.136-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 19efb5ebdaf0f1d5effa4ee4cf0905bfb15e46fbceff451fd5d770fb08d7ec63
MD5 a51e939036f92b46787b0f2262abb896
BLAKE2b-256 fef92e21eb260c3152166d23bac816e75e64b3fae21a7e5c02642f8a7488b6f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250131.136-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c9ba870fe551577041f58a3ad1ae9e2c980efdc9c68da5a69364b98f11533a89
MD5 7d1535faa88725e4ea2eaee88c15f5bc
BLAKE2b-256 24586ed366715420a3f856c0ef4c05c2e13904a117ee00821bfbe338887f95ce

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