Skip to content

NSEazy is a python library to get publicly available data NSE India and NIFTY Indices

License

Notifications You must be signed in to change notification settings

DrChandrakant/NSEazy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NSEazy Checks pypi python License: MIT

NSEazy

NSEazy Is A Python Library To Get Publicly Available Data NSE India and NIFTY Indices

Installation

pip install --upgrade nseazy


Unoffical NSE (National Stock Exchange) of India API

This repository, DrChandrakant/NSEazy, contains a new NSE (National Stock Exchange) API that makes fetching financial nse listed companies easier. It interfaces nicely with Pandas DataFrames.

More importantly, the NSEazy API automatically does the extra work that the user previously had to do "manually" with the other API. .

The conventional way to import the new API is as follows:

    import nseazy as nse

The most common usage is then to call

    nse.help('show_data')

where the help method and show_data function for which the user seeks help.

    data_required = {'Info' : True } # LTP : True By Default
    nse.show_data('L&T',data_required)
    data_required = {
        'OHLCV' : True,
        'Start' : '10-6-2023', # Error month or date 06 or 6 will be corrected automatically
        'End'   : '19-06-2023' 
    } # OHLCV : False By Default
    nse.show_data('TCS',data_required)
Open High Low Close Volume
Date
2019-11-01 3050.72 3066.95 3050.72 3066.91 510301237
2019-11-04 3078.96 3085.20 3074.87 3078.27 524848878
2019-11-05 3080.80 3083.95 3072.15 3074.62 585634570

Details on how to call the new API can be found below under Basic Usage, as well as in the jupyter notebooks in the examples folder.

I am very interested to hear from you regarding what you think of the new NSE API nseazy, plus any suggestions you may have for improvement. You can reach me at [email protected] or, if you prefer, provide feedback or a ask question on our issues page.


Main Features:

  • Getting live quotes for stocks using stock codes.
  • Return data in both json and python dict and list formats.
  • Getting quotes for all the indices traded in NSE, e.g CNX NIFTY, BANKNIFTY etc.
  • Getting list of top losers.
  • Getting list of top gainers.
  • Helper APIs to check whether a given stock code or index code is correct.
  • Getting list of all indices and stocks.
  • Cent percent unittest coverage.