Comparing Open Interest Between Two Strike Prices Using Dhan API

Hello @Tradehull_Imran Ji,

Good Evening!

How can I effectively compare the open interest (OI) between two different strike prices using the Dhan API in Python? Could you provide a brief algorithm or code snippet to illustrate this comparison?

Hi @Hemal_Chhatrala ,

You can fetch the oi data seperately for each stock as below:

name = 'NIFTY 03 APR 23200 CALL'
quote_data = tsl.get_quote_data(name) 
call_oi_data = quote_data[name]['oi']

Using this code you can do for other strike prices and compare them.
Let me know if you face any issue.

2 Likes