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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.10macOS 13.0+ ARM64

PKNSETools-0.1.20250122.135-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.20250122.135.tar.gz.

File metadata

  • Download URL: pknsetools-0.1.20250122.135.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.20250122.135.tar.gz
Algorithm Hash digest
SHA256 dc10baba0d0fd8450b5f08494428481ae4af72debea77d72fe6116b63d0c6258
MD5 2bcedb8b4e5549e71f7c7aae430f4cd3
BLAKE2b-256 3d5e3a19b33a78c68f2f31b87e4f632d6914593736339e683d8ecb6671515e2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250122.135-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 55482bd2da06e9a2418a09161db0ae098cec56e915e97ac0ed71becc980a7f93
MD5 23096353ded14086edaa318732ad0891
BLAKE2b-256 25dcf339a5c2c8b99a95d9ee8976b3d4c991ba3cb6caaf8da54c982941734938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250122.135-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5bc5047866555a15e148539754ff6ad15d19fb03c840642c20407433a20cd956
MD5 1896b6ca95b544f67006ea38310db3ee
BLAKE2b-256 af45703d22255d1e8ecc41176a97cd89e5343750319465318bae421dadceef83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250122.135-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 99afc761ffb09f5b37837584864bd559df900518ffd3103f99cc32fa56527f8a
MD5 fc10576031697650ddbd904f58d83a51
BLAKE2b-256 84307465f99d536a9f4b68614601d3debd944f0726302a1dc92fad2231544a9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PKNSETools-0.1.20250122.135-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 45abe9a79e7b9abf70ab22153a018f9fca61c5f31f17e2cc764ae77d96f131a5
MD5 d71af00b84d44f3cdf90ee50889dc18f
BLAKE2b-256 46cf45739a83c47b93b1b456e05733060acb5f50d485e9f36464d47062087a3a

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