@Tradehull_Imran Sir, you mentioned in vids that the scripts can be run from cloud. Please could you mention steps on migrating setup to any of the public cloud platforms free personal cloud account (installations, quota restrictions for running from a free personal account in cloud, ingress/egress costs, monitoring, which setup would be least costly - GCP/Azure/AWS etc.)?
@Tradehull_Imran Its back again
CALL for NIFTY MAR FUT. Lets check for FINNIFTY 27 MAR 23050 CALL
@Dhan @RahulDeshpande
Please check
@Tradehull_Imran ,
This happened with me as well for today,
For,
ce_name, pe_name, strike = tsl.ATM_Strike_Selection('NIFTY', Expiry=0)
I’m using Codebase Version 2.8
There is no FINNIFTY keyword in my script.
It is fluctuating between NIFTY and FINNIFTY.
Even though got punched the order for it. ![]()
Hey mate, I guess it would be covered in upcoming episode or the episode is out already? ![]()
I’m also eagerly waiting to deploy my algo on ![]()
Hi,
I too had faced this issue twice, wrote here and to help@dhan.com. shared my code. but then this stopped with me, automatically, after a day or two.
Ok thank you.
daily_data = tsl.get_historical_data(tradingsymbol= name,exchange=‘NSE’,timeframe=“DAY”)
#when i change time frame 15 or 5 it gives data but when i change it to “DAY”.It gives error message
sir,
i tried to run loop to fetch daily historical data(time frame DAY) by below listed coding
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 datetime
client_code = “”
token_id = “”
tsl = Tradehull(client_code,token_id)
watchlist = [“INDUSINDBK”,“TATAMOTORS”,“ULTRACEMCO”,“POWERGRID”,“TATASTEEL”,“BAJAJFINSV”,“JSWSTEEL”,“SUNPHARMA”,“ICICIBANK”,“COALINDIA”,“GRASIM”,“ONGC”,“SBILIFE”,“BEL”,“NTPC”,“ITC”,“TECHM”,“SBIN”,“HINDALCO”,“AXISBANK”,“LT”,“MARUTI”,“HDFCLIFE”,“DRREDDY”,“WIPRO”,“TRENT”,“TATACONSUM”,“BAJAJ-AUTO”,“HDFCBANK”,“CIPLA”,“BAJFINANCE”,“KOTAKBANK”,“M&M”,“ADANIPORTS”,“HCLTECH”,“RELIANCE”,“TCS”,“HINDUNILVR”,“NESTLEIND”,“TITAN”,“ADANIENT”,“SHRIRAMFIN”,“ASIANPAINT”,“HEROMOTOCO”,“BHARTIARTL”,“BPCL”,“EICHERMOT”,“APOLLOHOSP”,“INFY”,“BRITANNIA”]
for name in watchlist:
#print(name)
daily_data = tsl.get_historical_data(tradingsymbol= name,exchange=‘NSE’,timeframe=“DAY”)
#when i change time frame 15 or 5 it gives data but when i change it to “DAY”.It gives error
daily_data = tsl.get_historical_data(tradingsymbol= name,exchange='NSE',timeframe="DAY")
#today on 23-3-2025 early morning at 5 am i ran the code it works fine.
But after 6 AM it is giving error messages.
#error message
Exception in Getting OHLC data as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing required fields, bad values for parameters etc.’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing required fields, bad values for parameters etc.’}}
Hi @Tradehull_Imran,
could you please provide the session code link to download code folder ?
Thanks,
Rahul
I have error. I installed python 3.8.0. after that when i am going to instal .bat file it shows error you are not using 3.8.0 version
Hi @Tradehull_Imran,
I started with first series and while trying, got some errors. Found out about dhan_tradehull_V2, and a new learning series.
Just want to know if I need to complete the old series or can directly jump to the new one, as the older one is having issues and we need to rectify them.
@Tradehull_Imran , There seems to be some issue in ATM_Strike_Selection when NIFTY is given. It returns FINNIFTY CE and PEs. Please check
atm_ce_name, atm_pe_name, strike = tsl.ATM_Strike_Selection(
Underlying=“NIFTY”, Expiry=0
)
Hi @Tradehull_Imran,
Can u guide me how to get the Market depth seem api doc explains based on it was with version 2 but with v3 it is not working.
Can u please help me with a sample code to get the market depth.
Also When I am trying to get the LTP on weekend it is give error. How do we know this if it is happening because of the market close or there is something wrong in the code. Or some solution in this. I will surely check this on a working day then will let u know. Asked this because this is happening for all the items that are live market related.
@Tradehull_Imran
Sir, is there any option to fetch the open interest of a particular strike price, e.g., “NIFTY 27 MAR 23100 CALL”?
Hi @Dhan Team / @Tradehull_Imran ,
I have installed python successfully and able to connect account. But unable to get the ltp.
Please assist here.
import pdb
import time
import datetime
import traceback
from Dhan_Tradehull import Tradehull
import pandas as pd
from pprint import pprint
import talib
client_code = ""
token_id = ""
tsl = Tradehull(client_code,token_id)
pdb.set_trace()
ltp = tsl.get_ltp_data(names = ['NIFTY 27 MAR 23000 CALL', 'NIFTY 27 MAR 23000 PUT', "ACC", "CIPLA"])
Output Error
D:\Project\Dhan\Session3.1 Codebase Upgrade\3.1 Codebase Upgrade>py "How to use updated codebase.py"
Codebase Version 3
-----Logged into Dhan-----
reading existing file all_instrument 2025-03-23.csv
Got the instrument file
[0] > d:\project\dhan\session3.1 codebase upgrade\3.1 codebase upgrade\how to use updated codebase.py(17)<module>()
-> ltp = tsl.get_ltp_data(names = ['NIFTY 27 MAR 23000 CALL', 'NIFTY 27 MAR 23000 PUT', "ACC", "CIPLA"])
(Pdb++) ltp
*** NameError: name 'ltp' is not defined
(Pdb++) ACC
*** NameError: name 'ACC' is not defined
(Pdb++) (Pdb++)
*** NameError: name 'ACC' is not defined
(Pdb++) CIPLA
*** NameError: name 'CIPLA' is not defined
(Pdb++) ltp
*** NameError: name 'ltp' is not defined
(Pdb++)
https://private-poc.madefortrade.in/u/Tradehull_Imran
Thank you very much Sir for your kind reply. It’s working.
One more help Sir, I am not able to run more than one algo at a time. Kindly help in this regard.
Today, again Finifty call was bought iinstead of NIFTY… !!! Very strange… isn’t it?
@Tradehull_Imran Sir… pls look into this issue…
clearly, can be seen that EMA and other values are for NIFTY and instead FINIFTY got bought… !!!

