# National Stock Exchange (India) Web-Scraping For getting Required Data
## WebSite-Url : [https://www.nseindia.com/](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)
```python
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)
```python
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,
```python
from intra_day import Intra_Day
ID = Intra_Day('TATA MOTORS')
timeStamp, dataPoints = ID.intraDay()
```
and for NIFTY use,
```python
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
```python
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
```
```python
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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/pkjmesra/PKNSETools",
"name": "PKNSETools",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "NSE, Stocks, Data Download",
"author": "pkjmesra",
"author_email": "pkjmesra@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/98/55/dd0b15f5a72453f0e217cee485f7720b77c0d487d89b42721eed0687306d/PKNSETools-0.1.20240518.112.tar.gz",
"platform": null,
"description": "# National Stock Exchange (India) Web-Scraping For getting Required Data\r\n\r\n## WebSite-Url : [https://www.nseindia.com/](https://www.nseindia.com/)\r\n\r\n## gereral.py\r\nThat uses NSE private search api for getting id of a stock\r\n\r\nexample tata moors (Common name) :- TATAMOTORSEQN (ID assigned by NSE)\r\n```python\r\nfrom general import getId\r\nid = getId('tata motors')\r\n```\r\n\r\n\r\n## today_all_stock.py\r\nGives all data of all companies including NIFTY, and you save it as CSV file.\r\ngetTodayData() returns tuple in the form of (nifty_data, Company_data)\r\n\r\n```python\r\nfrom today_all_stocks import getTodayData\r\nnifty_data, companies_data = getTodayData() \r\n```\r\n\r\n## intra_day.py\r\nif 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\r\n\r\nFor Companies use like this,\r\n```python\r\nfrom intra_day import Intra_Day\r\nID = Intra_Day('TATA MOTORS')\r\ntimeStamp, dataPoints = ID.intraDay()\r\n```\r\n\r\nand for NIFTY use,\r\n\r\n```python\r\nfrom intra_day import Intra_Day\r\nID = Intra_Day('NIFTY 50')\r\ntimeStamp, dataPoints = ID.nifty_intraDay()\r\n```\r\n\r\ncall nifty_intraday() or intraDay() as many times you need\r\n\r\n\r\n## individual_company_stock.py\r\nThis will give you the historical data of that stock. max 3 years \r\n\r\n```python\r\nfrom individual_company_stock import getHistoryData\r\ngetHistoryData('SHREECEM',from_date='30-04-2020',to_date='30-04-2021') \r\n# Default params : from_date = today's date in last year DD-MM-(YYYY-1), to_date=today's date DD-MM-YYYY\r\n# for example today is 30-04-2021; from_date = 30-04-2020 to_date = 30-04-2021\r\n```\r\n\r\n```python\r\nfrom individual_company_stock import niftyHistoryData\r\nniftyHistoryData('NIFTY 50') \r\n# Default params : from_date = today's date in last year DD-MM-(YYYY-1), to_date=today's date DD-MM-YYYY\r\n# for example today is 30-04-2021; from_date = 30-04-2020 to_date = 30-04-2021\r\n```\r\n\r\n",
"bugtrack_url": null,
"license": "OSI Approved (MIT)",
"summary": "A Python-based data downloader for NSE, India",
"version": "0.1.20240518.112",
"project_urls": {
"Download": "https://github.com/pkjmesra/PKNSETools/archive/v0.1.20240518.112.zip",
"Homepage": "https://github.com/pkjmesra/PKNSETools"
},
"split_keywords": [
"nse",
" stocks",
" data download"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "13d03d237d9b1bc8ef8472416cec49531d607eb8ad5cfdde0c2e4a36ffc719a1",
"md5": "9e416128f59bc6a37854a49e8beab09b",
"sha256": "5c656f38271acbe74b2c3f391362b3a0bb810cf41cad381a3edeb19cb83d1417"
},
"downloads": -1,
"filename": "PKNSETools-0.1.20240518.112-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9e416128f59bc6a37854a49e8beab09b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 82202,
"upload_time": "2024-05-18T17:29:30",
"upload_time_iso_8601": "2024-05-18T17:29:30.063759Z",
"url": "https://files.pythonhosted.org/packages/13/d0/3d237d9b1bc8ef8472416cec49531d607eb8ad5cfdde0c2e4a36ffc719a1/PKNSETools-0.1.20240518.112-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9855dd0b15f5a72453f0e217cee485f7720b77c0d487d89b42721eed0687306d",
"md5": "515ba11299f6e5547dac785469dfa995",
"sha256": "d407757ebc89adb86cf3c50b912bbbe8935b50147ac12fb30242a7adef4c4f0a"
},
"downloads": -1,
"filename": "PKNSETools-0.1.20240518.112.tar.gz",
"has_sig": false,
"md5_digest": "515ba11299f6e5547dac785469dfa995",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 67294,
"upload_time": "2024-05-18T17:29:32",
"upload_time_iso_8601": "2024-05-18T17:29:32.561539Z",
"url": "https://files.pythonhosted.org/packages/98/55/dd0b15f5a72453f0e217cee485f7720b77c0d487d89b42721eed0687306d/PKNSETools-0.1.20240518.112.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-18 17:29:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pkjmesra",
"github_project": "PKNSETools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "bs4",
"specs": []
},
{
"name": "mthrottle",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "PKDevTools",
"specs": []
},
{
"name": "pytz",
"specs": []
},
{
"name": "requests",
"specs": []
},
{
"name": "urllib3",
"specs": []
},
{
"name": "xmltodict",
"specs": []
},
{
"name": "yfinance",
"specs": []
}
],
"lcname": "pknsetools"
}