Option chain is not getting

Hello @Tradehull_Imran sir,

Firstly, many thanks for second algo series. :slight_smile:

I am facing issue while fetching option data in my algo, i got blank rows and collum’s i have use below code

import pdb
import time
import datetime
import traceback
from Dhan_Tradehull import Tradehull
import pandas as pd
from pprint import pprint
import talib
import pandas_ta as ta
import xlwings as xw

client_code = “”
token_id = “”
tsl = Tradehull(client_code,token_id)

pdb.set_trace()

option_chain = tsl.get_option_chain(Underlying=“NIFTY”, exchange=“INDEX”, expiry=0)


E:\siddesh\Trading\Sublime\code\Advance Algo\Session 2>py “5. Scan Option Chain.py”
Codebase Version 3
-----Logged into Dhan-----
reading existing file all_instrument 2025-02-22.csv
Got the instrument file
[0] > e:\siddesh\trading\sublime\code\advance algo\session 2\5. scan option chain.py(19)()
→ option_chain = tsl.get_option_chain(Underlying=“NIFTY”, exchange=“INDEX”, expiry=0)
(Pdb++) option_chain = tsl.get_option_chain(Underlying=“NIFTY”, exchange=“INDEX”, expiry=0)
(Pdb++) option_chain
CE OI CE Chg in OI CE Volume … PE Theta PE Gamma PE Vega
0 0 0 0 … 0.0 0.0 0.0
1 0 0 0 … 0.0 0.0 0.0
2 0 0 0 … 0.0 0.0 0.0
3 0 0 0 … 0.0 0.0 0.0
4 0 0 0 … 0.0 0.0 0.0
… … … … … … … …
244 0 0 0 … 0.0 0.0 0.0
245 0 0 0 … 0.0 0.0 0.0
246 0 0 0 … 0.0 0.0 0.0
247 0 0 0 … 0.0 0.0 0.0
248 0 0 0 … 0.0 0.0 0.0

[249 rows x 27 columns]
(Pdb++)

Hi @Siddesh ,

It is not blank rows/ columns, we are getting the whole option chain in a call, but 0’s are occurring for far OTM and ITM’s