How to get open price of index


  • There is confusion regarding how to get live data for indices.
    As per documentation , sfi is the websocket task for subscribing index.

    socket.subscribe("mw", "nse_cm|26000") //nifty
    

    However that wont work
    Response from websocket

    Ticks: [{'name': 'tm', 'tvalue': '02/12/2021 11:45:43'}]
    

    Using mw as websocket task works

    socket.subscribe("mw", "nse_cm|26000")
    

    Response from websocket

    Ticks: [{'name': 'tm', 'tvalue': '02/12/2021 11:48:18'}, {'c': '17166.90', 'cng': '135.10', 'e': 'nse_cm', 'ltp': '17302.00', 'ltt': 'NA', 'name': 'sf', 'nc': '00.787', 'tk': '26000'}]
    -----------------------------------------------------------------------------------------
    Ticks: [{'name': 'tm', 'tvalue': '02/12/2021 11:48:19'}, {'c': '17166.90', 'cng': '136.25', 'e': 'nse_cm', 'ltp': '17303.15', 'ltt': 'NA', 'name': 'sf', 'nc': '00.7937', 'tk': '26000'}]
    -----------------------------------------------------------------------------------------
    Ticks: [{'name': 'tm', 'tvalue': '02/12/2021 11:48:20'}, {'c': '17166.90', 'cng': '135.35', 'e': 'nse_cm', 'ltp': '17302.25', 'ltt': 'NA', 'name': 'sf', 'nc': '00.7884', 'tk': '26000'}]
    -----------------------------------------------------------------------------------------
    Ticks: [{'name': 'tm', 'tvalue': '02/12/2021 11:48:21'}, {'c': '17166.90', 'cng': '137.05', 'e': 'nse_cm', 'ltp': '17303.95', 'ltt': 'NA', 'name': 'sf', 'nc': '00.7983', 'tk': '26000'}]
    

    I dont see the open price (filed op)

    @admin : How can I get the open price ?


  • Is open price the same as the ltp at 9:15AM ?


  • @ananya said in How to get open price of index:

    @admin The thread discusses about OHLC values for candles.
    But I am looking for only day's open price.
    There is a filed as per documentation 20 op Open price
    However this is not present in the reponse

    Yes, the response does not return open and high value.


  • @admin The thread discusses about OHLC values for candles.
    But I am looking for only day's open price.
    There is a filed as per documentation 20 op Open price
    However this is not present in the reponse


  • This post is deleted!