NSEPython Discussion and Feature Request

Discussions and Feature Request for NSEPython



I have been using and building my own database for years on some of these APIs now, but didnt know bulk results API, events API existed. I was using



Thanks a lot for sharing those APIs. I think I can simplify some of my processing with your urls.


TypeError: cannot unpack non-iterable NoneType object
Getting this error intermittently while using the function: df, ltp, crontime = oi_builder(“NIFTY”)
need to know a way to handle this

can we make the function to retry multiple times if there is no data?? because if i keep trying Iam getting data after some 10-15 seconds


Does anybody have list of all the apis provided by nseindia?

I will add a try except.

Make sure to update to the latest version.

Hello, I am not able to get mid month expiry futures price from nse_quote_ltp() , Say: nse_quote_ltp("NIFTY","28-Jan-2021","Fut"). Is there any other method to get it?

Minor overlook as I don’t do calendar’s myself. I will make it work in the next update. :slight_smile:

2 posts were merged into an existing topic: How can we get USDINR live options data and options chains data?

This weekend I will update the NSEPython Code to the new module. If you want any features to be added, feel free to pitch in.

Any functions you want.

Can you please put FII DII deals, bulk orders fetching.

Bulk Orders… ? Just FII DII or You are saying Historical? I don’t see Historical APIs in new NSEIndia site. Let me know if you see endURL of them. I will add.

Current day as well as Historical.
I have seen somewhere on nse but not getting. To give you an idea
This gives data but it’s symbol wise.

I am looking for something like this

Can we get symbol wise data of FII DII ?

And also this

  1. Fixed the OI problem as mentioned here. NSEPython Documentation - #14
  2. Added ATM Strike Function as mentioned here - Getting the ATM strikes for all the FNO stocks
  3. Removed Pickle as suggested by everyone.
1 Like

Adding this to main library.

I found out. It is at

1 Like
  • Session 1: Morning Block Deal Window (first session): This window shall operate between 08:45 AM to 09:00 AM.
  • Session 2: Afternoon Block Deal Window (second session): This window shall operate between 02:05 PM to 2:20 PM.
  • %CHNG: % change is calculated with respect to adjusted price on ex-date for Corporate Actions like: Dividend, Bonus, Rights & Face Value Split and also adjusted for Past 365 days & 30 days.
  • Last Updated status display the last Block Deal transaction.

This is pretty interesting stuff.

This one is done too.

getting different list of top gainers from nse_get_top_gainers() function and NSE site . Please check
Program Output :

   symbol dayHigh  dayLow lastPrice
0   TATAPOWER   132.7     119       125
1      RECLTD   167.8  152.75     164.2
2  IBULHSGFIN   275.5   253.5    263.55
3   POWERGRID   245.5   233.8    243.25
4         PFC     133   124.5     129.5

NSE output :

date : 09-06-2021