Hi @deva ,
We don’t have any dump available for download at the moment.
Hi @deva ,
We don’t have any dump available for download at the moment.
Dear Sir,
How to get expired option data for specific nifty option strike for the given date with 1 min time frame.
Hello sir, how to get the code for Direction option selling algo?
HI @Mihir_Shah ,
We need to follow both steps to get expired options data
Refer this link it gives consolidated data -
Refer this link it gives strike wise data -
Hi @prashantjawale21 ,
We are still working on it . We will update you soon .
Hi @Tradehull_Imran - Can you figure out a way to add websocket (Marketfeed) in Tradehull library? It will be helpful for quick scalping algos.
Thanks.
Hi @Sadha ,
Websocket was already integrated in codebase.
Refer this video for the code reference -
code files : https://drive.google.com/file/d/1OD_t105oPVS5VnLxKv9k6Hp4Fj-uPqrM/view
Hello Sir,
With your given guidance I was able to fetch the expired option data explained in the youtube video.
I am working on options backtesting using Tradehull and need some knowledge about historical options data.
For any given trading day, I want:
1-minute option data
For ATM / OTM strikes
For the nearest or next weekly expiry contract
I was able to download the data and then manipulate them to make data based on the strike selection.
Example: 27 Jan 2026 (Tuesday - expiry day)
If I use:
get_expired_option_data(...)
Will it return data for:
Example: 29 Jan 2026 (Thursday)
I want data for:
Does it return:
Previous expiry (27 Jan)?
OR next expiry (03 Feb)?
Hi @Mihir_Shah ,
In this function, for the given from_date and end_date, it will return expiry dates within that range—monthly expiries if monthly is selected, or weekly expiries if weekly is selected.
Refer the below codes -
Fetch Expired Option Chart Data
Retrieve minute-wise OHLC, Volume, IV, OI, Spot, and Strike data for expired option contracts (index options only, as supported by DHAN).Get Expired Option Data
"NIFTY", "BANKNIFTY", "RELIANCE")."NSE", "BSE"1, 5, 15, 25, 60."MONTH" for monthly contracts"WEEK" for weekly contracts1 → Near expiry2 → Next expiry3 → Far expiry"ATM", "ATM+3", "ATM-3"."CALL" or "PUT".["open","high","low","close","volume","iv","oi","spot","strike"]YYYY-MM-DD format.YYYY-MM-DD format.data = tsl.get_expired_option_data(tradingsymbol=“RELIANCE”,exchange=“NSE”,interval=1,expiry_flag=“MONTH”,expiry_code=1,strike=“ATM”,option_type=“CALL”,from_date=“2024-10-10”,to_date=“2024-11-10”)
Hello Sir,
Thanks for the guidance I am able to fetch the expired options data now.
The output is only having datetime,open,high,low,close,volume,iv,oi,spot,strike
How to add expiry date in the output, without the expiry date it is not possible to backtest alogo and manipulate data also on which basis we can save the records that can be used for further
Please Guide.
Thanks
data = tsl.get_historical_data(tradingsymbol=‘NIFTY’, exchange=‘INDEX’, timeframe=“DAY”)
Exception in Getting OHLC data as dhanhq.convert_to_date_time() missing 1 required positional argument: ‘epoch’
can you help ?
Seems like Dhan-Tradehull 3.2.2 is broken
hi @Mihir_Shah
the expiry date is in filename,
check this videoo
so while back testing, we read the filenames, and thus we get expiry.. and particular strike data also to backtest
I have wasted 3+ hours and I’ve not been able to pull even a single historical option data point. I keep getting this error message ““errorCode”:“DH-905”,“errorMessage”:“Missing required fields, bad values for parameters etc.
What am I doing wrong?
payload ={
"exchangeSegment": "NSE_FNO",
“interval”: “1”,
“securityId”:13,
“instrument”: “OPTIDX”,
“expiryFlag”: “WEEK”,
“expiryCode”:1,
“strike”: “ATM”,
“drvOptionType”: “CALL”,
“requiredData”: [
“open”,
“high”,
“low”,
“close”,
“volume”
\],
“fromDate”: “2026-04-21”,
“toDate”: “2026-04-21”
}
Getting this error for all tickers I am trying to extract data for
INDIGO 2025-01-30 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-02-27 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-03-27 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-04-24 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-05-29 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-06-26 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-07-31 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-08-28 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-09-30 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-10-28 : Error ‘NoneType’ object has no attribute ‘to_csv’
Exception in get_expired_option_data: ‘Tradehull’ object has no attribute ‘instrument_df’
INDIGO 2025-11-25 : Error ‘NoneType’ object has no attribute ‘to_csv’
I am facing a weird issue with login. The first time I log in using Tradehull(client_code, token_id), it works fine and creates a token file under the dependencies folder. However, the next time, it always tries to renew the token, regardless of whether I provide a new token in the code or not.
Since I do not keep my code running continuously and sometimes log in after 24 hours, the token expires by then. When I try to provide a new token, it still attempts to renew the old token and fails. After that, I have to uninstall everything, clean the files, and reinstall it again.
@Tradehull_Imran
Hi @Sidharth_Jain ,
This is a login issue, Try
This will create a fresh login. and mostly it will run the code now
This is a login issue, we are checking on it.
till then
Here we do not need to uninstall anything, just reset the token
we are checking on it.. and will update once we get a solution