Fetching OI and IV for Selected Strikes (Tradehull / Dhan)

Hi @Tradehull_Imran

We are using Tradehull with Dhan for NIFTY options.

We need to fetch OI and IV for a selected strike price (for example 25300 CE & PE, specific expiry).

Right now we are getting only LTP.

Can you please suggest the correct way to fetch OI and IV?

Please guide the best method.

Hi @Tradehull_Imran, Just re-tagging in case my earlier message got missed. Thanks :folded_hands:

Hi @Ketan_Kharva ,

You can use the below code-

atm_strike, option_chain = tsl.get_option_chain(Underlying="NIFTY", exchange="INDEX", expiry=0, num_strikes=10)
strike = 25000
r = option_chain.loc[option_chain["Strike Price"].eq(strike)].iloc[0]
ce_oi, ce_iv, pe_oi, pe_iv = r["CE OI"], r["CE IV"], r["PE OI"], r["PE IV"]
1 Like