Package: nseinfopackage
PackagenseinfopackageDate: 31-May-2022InstallationUse the following for importing:from nseinfopackage import nseinfoPrerequisitesThepandaspackage will be imported aspd.FeaturesThis 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 companyName of the CompanyISIN Number of the companyDate of listingPaid up ValueMarket lot, andFace ValueMethods of the PackageThis 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 -irsandvalue. 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 examplesThenseinfo.getISINNumber(symbol)method acceptssymbolwhich is a string variable. It returnsISIN, which is also a string, and any ISIN begins withINE. Example:nseinfo.getISINNumber('INFY')returnsINE009A01021nseinfo.getISINNumber('M&M')returnsINE101A01026Thenseinfo.getSymbol(isin)method acceptsisinwhich 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'ThegetName(irs, value)method accepts two inputs -irsandvalue. Theirscan have one of the two values - 'SYMBOL' or 'ISIN'. Based on this the value ofvaluechanges. 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 methodgetMarketLot(irs, value)also accepts two inputs -irsandvalue. Theirscan have one of the two values - 'SYMBOL' or 'ISIN NUMBER'. Based on this the value ofvaluechanges. 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 methodnseinfo.getFaceValue(irs, value)accepts two inputs -irsandvalue. Theirscan have one of the two values - 'SYMBOL' or 'ISIN NUMBER'. Based on this the value ofvaluechanges. 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 methodnseinfo.getPaidUpValue(irs, value)is also similar to the above methods. This method accepts two inputs -irsandvalue. Theirscan have one of the two values - 'SYMBOL' or 'ISIN NUMBER'. Based on this the value ofvaluechanges. 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.Thenseinfo.listedSince(irs, value)method, like the others, accepts two inputs -irsandvalue. Theirscan have one of the two values - 'SYMBOL' or 'ISIN NUMBER'. Based on this the value ofvaluechanges. 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 methodgetISINNumbers(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 methodgetSymbols(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 CaveatsThe 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 thannseinfo.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 referhttps://pypi.org/project/thematicnifty/