Live data for dashboard

I am making a dashboard for stocks and indicators, for which I need live data, how can I get it and how can I do it and can i use these data for commercial?

Hi @7350982949 ,

Refer this link to setup and login for DHAN_TradeHull -

Refer this sample code to get historical data -

   data = tsl.get_historical_data(tradingsymbol='NIFTY', exchange='INDEX', timeframe="DAY")

Arguments:

  • tradingsymbol (str): The trading symbol for the instrument you want to fetch data for (e.g., ‘NIFTY’, ‘ACC’).
  • exchange (str): The exchange where the instrument is traded (e.g., ‘NSE’, ‘INDEX’).
  • timeframe (str): The timeframe for the data. It can be:
    • ‘1’ for 1-minute candles
    • ‘5’ for 5-minute candles
    • ‘15’ for 15-minute candles
    • ‘25’ for 25-minute candles
    • ‘60’ for 60-minute candles
    • ‘DAY’ for daily candles
  • sector (optional, str): Set to “YES” to fetch sector data(e.g., ‘Nifty Healthcare’, ‘NIFTY 100’). Default is “NO”.

To build indicators, you can use TA-Lib. For commercial use of this data, it would be best to connect with your broker and check the applicable terms with them.

![Screenshot 2026-05-04 144310|690x253](upload://tEJFfhoiq38pGRAAVE8EopNHlT9.png)
I am creating a dashboard as per the screenshot given above and using tradehull money function, data is coming to this dashboard but I want live data for that. I asked NSE for data. That option seems expensive. Are there any other options? pls tell me imran sir 

Hi @7350982949 ,

We can get data for LTP , Quotes data and Historical data from API .

Refer the sample code to get LTP and Quotes data -

ltp = tsl.get_ltp_data(names=['CRUDEOIL', 'NIFTY'])

quote = tsl.get_quote_data(names=['CRUDEOIL', 'NIFTY'])

Get LTP

  • Arguments:
    • names (list or str): List of instrument names or a single instrument name to fetch the LTP.
    • debug (optional, str): Set to “YES” to enable detailed API response logging. Default is “NO”.

Get Quotes

  • Arguments:
    • names (list or str): List of instrument names or a single instrument name to fetch the Quote data.
    • debug (optional, str): Set to “YES” to enable detailed API response logging. Default is “NO”.