Fetching Live market feed & Historical data for Index options & F&O Stocks

I’m new to the coding scene, with the help AI, I already built a bot with my strategy. Now I need to work with this API to get live feed and historical data for multiple tickers for my analysis. Can you guide or any sample code, that would fetch these data for my analysis. it would be really useful.

@t7support @Sammy @Algo_Trader_Harsh

Hello @NaveenKasthoori

Welcome to Dhan Community!

Sure, you can get started with Dhan’s Official Python library, which has sample code as well: DhanHQ Python Library.

I need to access the OI data for nifty, bankniifty and for some stocks as well. It would really useful. If there is any examples to do this exact same thing.

Hello Naveen,

You can use Live Market Feed and get OI data on the feed itself for all instruments.