Not getting %LTP change for nse options from dhan api. While this is available to view on the app or desktop.
How can I fetch this info or calculate it locally using the available data?
Not getting %LTP change for nse options from dhan api. While this is available to view on the app or desktop.
How can I fetch this info or calculate it locally using the available data?
@vedvishwa Try this. Google Search
Hi @vedvishwa ,
Refer the below code-
ltp_data = tsl.get_ltp_data(['NIFTY'])
ltp = ltp['NIFTY']
ltp_change_percent = ((ltp - previous_close) / previous_close) * 100