A small package that helps you in fetching getting the basic details of a specific company, or getting symbols list, of isin number list, or listed dates etc.
Project description
Package nseinfopackage
Date: 31-May-2022
Installation
Use the following for importing: from nseinfopackage import nseinfo
Prerequisites
The pandas
package will be imported as pd
.
Features
This is a comprehensive app that will allow you to get the details of about 1800 stocks from the National Stock Exchange (NSE) India. This package is developed from the data that is shared by NSE. There are many methods with the help of which you can get the following details:
- Symbol of the company
- Name of the Company
- ISIN Number of the company
- Date of listing
- Paid up Value
- Market lot, and
- Face Value
Methods of the Package
This package is powered by many useful methods. The following is the list of all the methods and their return types.
nseinfo.getISINNumber(symbol)
This method takes the string input (symbol
) of the NSE stock as a string and returns the ISIN number of that stock as a string.nseinfo.getSymbol(isin)
This method takes the string input (isin
) of the NSE stock as a string and returns the SYMBOL of that stock as a string.nseinfo.getName(irs, value)
This method takes two arguments -irs
andvalue
. The name of the first argument - irs stands for ISIN or Symboe - hence irs. You can use either ISIN or SYMBOL to get the name of the company. Examples will be given below.nseinfo.getMarketLot(irs, value)
This method helps you in getting the value of Market Lot, as an integer. Input to the method would be either ISIN or SYMBOL, and example of its usage is given below.nseinfo.getFaceValue(irs, value)
This method helps you in getting the Face value of the underlying stock, as an integer. Input to the method would be either ISIN or SYMBOL, and example of its usage is given below.nseinfo.getPaidUpValue(irs, value)
This method helps you in getting the Paid-up value of the underlying stock, as an integer. Input to the method would be either ISIN or SYMBOL, and example of its usage is given below.nseinfo.listedSince(irs, value)
This method helps you in fetching the date since the stock was listed in the NSE exchange. Input to this would be, again, irs and value. Examples are shown below.nseinfo.getISINNumbers(symbols)
This methods takes a list of strings (SYMBOLS) as the argument, and provides a list of corresponding ISIN values, in that order.nseinfo.getSymbols(isins)
This methods takes a list of strings (ISIN) as the argument, and provides a list of corresponding SYMBOL values, in that order.
Method details with examples
- The
nseinfo.getISINNumber(symbol)
method acceptssymbol
which is a string variable. It returnsISIN
, which is also a string, and any ISIN begins withINE
. Example: nseinfo.getISINNumber('INFY')
returnsINE009A01021
nseinfo.getISINNumber('M&M')
returnsINE101A01026
- The
nseinfo.getSymbol(isin)
method acceptsisin
which is a string variable, and returns SYMBOL, which is also a string variable. Here are a couple of examples: nseinfo.getSymbol('INE009A01021')
returns 'INFY'nseinfo.getSymbol('INE101A01026')
returns 'M&M'- The
getName(irs, value)
method accepts two inputs -irs
andvalue
. Theirs
can have one of the two values - 'SYMBOL' or 'ISIN'. Based on this the value ofvalue
changes. See the below exmaples for clarity: nseinfo.getName('SYMBOL', 'INFY')
will return "Infosys Limited"nseinfo.getName('ISIN NUMBER', 'INE009A01021')
will also return "Infosys Limited"- The method
getMarketLot(irs, value)
also accepts two inputs -irs
andvalue
. Theirs
can have one of the two values - 'SYMBOL' or 'ISIN NUMBER'. Based on this the value ofvalue
changes. The return value is an integer. See the below exmaples: nseinfo.getMarketLot('SYMBOL', 'INFY')
will return integer value of 1.nseinfo.getMarketLot('ISIN NUMBER', 'INE768C01010')
will return integer value of 1.- The method
nseinfo.getFaceValue(irs, value)
accepts two inputs -irs
andvalue
. Theirs
can have one of the two values - 'SYMBOL' or 'ISIN NUMBER'. Based on this the value ofvalue
changes. The return value is an integer. See the below exmaples: nseinfo.getFaceValue('ISIN NUMBER', 'INE768C01010')
will return 10.nseinfo.getFaceValue('SYMBOL', 'ICICIBANK')
will return a value of 2.- The method
nseinfo.getPaidUpValue(irs, value)
is also similar to the above methods. This method accepts two inputs -irs
andvalue
. Theirs
can have one of the two values - 'SYMBOL' or 'ISIN NUMBER'. Based on this the value ofvalue
changes. The return value is an integer. See the below exmaples: nseinfo.getPaidUpValue('SYMBOL', 'ICICIBANK')
returns a value of 2.nseinfo.getPaidUpValue('ISIN NUMBER', 'INE040A01034')
returns a value of 1.- The
nseinfo.listedSince(irs, value)
method, like the others, accepts two inputs -irs
andvalue
. Theirs
can have one of the two values - 'SYMBOL' or 'ISIN NUMBER'. Based on this the value ofvalue
changes. The return value is string representation of date. Below are the examples: nseinfo.listedSince('SYMBOL', 'INFY')
will return '08-FEB-1995'.nseinfo.listedSince('ISIN NUMBER', 'INE358U01012')
returns '19-AUG-2019'- The method
getISINNumbers(symbols)
accept an array of symbols and return corresponding array of ISIN Numbers. Below are the examples. nseinfo.getISINNumbers(['INFY','HDFCBANK', 'ICICIBANK'])
returns ['INE009A01021', 'INE040A01034', 'INE090A01021']- The method
getSymbols(isins)
accept an array of ISIN Numbers and return corresponding arrays of SYMBOLS. Below is the typical example: nseinfo.getSymbols(['INE009A01021', 'INE040A01034', 'INE090A01021'])
returns ['INFY', 'HDFCBANK', 'ICICIBANK']
Notes and Caveats
- The ISINs or SYMBOLS are limited to SERIES type 'EQ' or Equities only.
- If there is an error in the input (ISIN Number or Symbol), the method returns an error 'Error! Some input values are incorrect or not found!' for all the methods other than
nseinfo.getSymbols()
andnseinfo.getISINNumbers()
. In case there are any errors with regards to the list of SYMBOLS or list of ISIN Numbers, then there is specific error with respect to that element, and the return will have a subset of the return value. For example, when you run the methodnseinfo.getSymbols(['INE009A01021', 'INE040A08034', 'INE090A01021'])
, the output will be ['INFY', 'ICICIBANK'], along with an error message 'Error! Some input values are incorrect or not found!' - You can combine niftythematic package and process for ISIN of different thematic nifty groups of shares. Please refer https://pypi.org/project/thematicnifty/
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
Built Distribution
File details
Details for the file nseinfopackage-0.1.1.tar.gz
.
File metadata
- Download URL: nseinfopackage-0.1.1.tar.gz
- Upload date:
- Size: 47.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99c0e67735f8a7252f99739482476c7ed8908d69217dc74a38e78a51a863591c |
|
MD5 | 43b01a93bfd1d928a47e9afcb8aae291 |
|
BLAKE2b-256 | 4e8821a7666f7180ffab5b8e8dbf98eed2d4c9a56916cdb57eac3b316e6bb401 |
File details
Details for the file nseinfopackage-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: nseinfopackage-0.1.1-py3-none-any.whl
- Upload date:
- Size: 46.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 616d9d0b84a8bc6b092360f8612050ad6966dfcc13ebc3343380c3378e4f3c15 |
|
MD5 | 18385658006d7f731441dd9734edc6ef |
|
BLAKE2b-256 | e2f327d94f2ddfe68e52fecee74436483ecfa8050e0ba2d41a6ed3a820e54374 |