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.20251223.143.tar.gz (70.4 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.20251223.143-cp312-cp312-win_amd64.whl (87.5 kB view details)

Uploaded CPython 3.12Windows x86-64

pknsetools-0.1.20251223.143-cp310-cp310-macosx_13_0_arm64.whl (87.0 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

pknsetools-0.1.20251223.143-cp310-cp310-macosx_10_9_x86_64.whl (87.0 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pknsetools-0.1.20251223.143.tar.gz
  • Upload date:
  • Size: 70.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pknsetools-0.1.20251223.143.tar.gz
Algorithm Hash digest
SHA256 4aa29ba6c66215ce27247a0f3bba8f1a1511518127681d26904cddd76b7ac912
MD5 23fed6d0a3ea23cebbccc586ead0d4a2
BLAKE2b-256 d136e9598d65231eaac3a9670c6a2a29f9d2cede759b7b11ede41af52365200a

See more details on using hashes here.

File details

Details for the file pknsetools-0.1.20251223.143-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pknsetools-0.1.20251223.143-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e6249638e61d8afa57fc39973b1e92bba6850635d2110300a17df34ff33fcfa0
MD5 747418637188f906db2e95e1c5a916a7
BLAKE2b-256 ee3b8ba43193b81104ba3307f0efac31d5dd67b58b053d89f638bb7bf14273c7

See more details on using hashes here.

File details

Details for the file pknsetools-0.1.20251223.143-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pknsetools-0.1.20251223.143-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 268980456a5625c826cebaf36fb1c7a7c6b1f3b38b1c7356fcb1f65d866ac5d2
MD5 cf994ac1ec9b3f88032838c325d0ea9d
BLAKE2b-256 b74e91575508338aa2344fcc833ad127fe6f0a7cdc1c1e89493dcde66ab80fc5

See more details on using hashes here.

File details

Details for the file pknsetools-0.1.20251223.143-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pknsetools-0.1.20251223.143-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 8d13fcd27968e0e4c88ce5dc127ff3ba83f5eb03812ca970b313a4795d765f3c
MD5 310568f3a4d4ab685110bf305b95d007
BLAKE2b-256 173ab7f2965af23aa2d18e7f9b4af8a40454ce55153552c05c05d4c6045982be

See more details on using hashes here.

File details

Details for the file pknsetools-0.1.20251223.143-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pknsetools-0.1.20251223.143-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 31dd4d575628bb812a94fc911afddcd7063a6acd2860718fa58c392042b26123
MD5 c845858b85ced78994dbd423555c18e3
BLAKE2b-256 104ddb3cb05847e94f08a32518362d15d2075a4822fa9d0084428a8a43db233f

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