Fetching ltp data issue(DHAN API) : May be only for today. Can any one confirm?

Traceback (most recent call last):
File “nifty18V1.py”, line 222, in
signal, stop_loss, target_price, stop_loss_points = check_entry_conditions(symbol)
File “nifty18V1.py”, line 74, in check_entry_conditions
ltp = tsl.get_ltp_data(symbol)[symbol]
KeyError: ‘BEML’

not able to fetch Ltp data , only historical data is fetching, can any one facing same problem today, or any code base update please reply ANYONE @Tradehull_Imran

yes only get_historical_price function working.. get_ltp_data & get_option_chain giving error today on 26th Feb 2025

Yes, I am also facing the same error. Did they provide any solution for this?

issue resolve automatically, its working

yes its resolved but why it was not working yesterday, if anyone can tell why not working yesterday

now all working, dont know why it was not working yesterday

Hello @Bhavesh_Nechlani @sanjeevans @Manish_Kumar

It was not working yesterday simply because markets were not live. Yesterday (i.e. 26th Feb) was a holiday on eve of Mahashivratri.

1 Like

@Hardik what about the issue that while fetching LTP of ATM strike price it gives LTP of FIN NIFTY of that strike prices. Please help

Hello @The_Rexx

Would suggest you to check the security ID list is updated for the day and correct security ID is being taken for this.

Please guide how to implement that and can you give the snippet of the code how to implement that @Hardik