PKNSETools


NamePKNSETools JSON
Version 0.1.20241222.132 PyPI version JSON
download
home_pagehttps://github.com/pkjmesra/PKNSETools
SummaryA Python-based data downloader for NSE, India
upload_time2024-12-22 00:53:36
maintainerNone
docs_urlNone
authorpkjmesra
requires_pythonNone
licenseOSI Approved (MIT)
keywords nse stocks data download
VCS
bugtrack_url
requirements brotli bs4 mthrottle numpy pandas PKDevTools pytz requests urllib3 xmltodict yfinance
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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/1f/8a/854d85c893581d01f64c54a74e3e22a0ffec34f39142a9977fb6fc388825/PKNSETools-0.1.20241222.132.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",
    "bugtrack_url": null,
    "license": "OSI Approved (MIT)",
    "summary": "A Python-based data downloader for NSE, India",
    "version": "0.1.20241222.132",
    "project_urls": {
        "Download": "https://github.com/pkjmesra/PKNSETools/archive/v0.1.20241222.132.zip",
        "Homepage": "https://github.com/pkjmesra/PKNSETools"
    },
    "split_keywords": [
        "nse",
        " stocks",
        " data download"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9cb61324eac7efc8a7be995ab327dd7a6dda7a29562391c867ae8db2deecb427",
                "md5": "9396ea3057d841cd2c72ed5ef54350c0",
                "sha256": "f4de1a0b3fa7d787407a5e7baf0014ee1c6396d32d544445984c2d3e2cc1c9a3"
            },
            "downloads": -1,
            "filename": "PKNSETools-0.1.20241222.132-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9396ea3057d841cd2c72ed5ef54350c0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 82767,
            "upload_time": "2024-12-22T00:53:33",
            "upload_time_iso_8601": "2024-12-22T00:53:33.736764Z",
            "url": "https://files.pythonhosted.org/packages/9c/b6/1324eac7efc8a7be995ab327dd7a6dda7a29562391c867ae8db2deecb427/PKNSETools-0.1.20241222.132-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f8a854d85c893581d01f64c54a74e3e22a0ffec34f39142a9977fb6fc388825",
                "md5": "c6c93eee7ba6a4385a48411c061a3cc8",
                "sha256": "f2fa9e9a6975287a9c19bdc966d0829e2a8af48752d03fb77830f7033552c585"
            },
            "downloads": -1,
            "filename": "PKNSETools-0.1.20241222.132.tar.gz",
            "has_sig": false,
            "md5_digest": "c6c93eee7ba6a4385a48411c061a3cc8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 67777,
            "upload_time": "2024-12-22T00:53:36",
            "upload_time_iso_8601": "2024-12-22T00:53:36.095807Z",
            "url": "https://files.pythonhosted.org/packages/1f/8a/854d85c893581d01f64c54a74e3e22a0ffec34f39142a9977fb6fc388825/PKNSETools-0.1.20241222.132.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-22 00:53:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pkjmesra",
    "github_project": "PKNSETools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "brotli",
            "specs": []
        },
        {
            "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"
}
        
Elapsed time: 0.44640s