Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    How to get open price of index

    General Discussion
    2
    6
    47
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ananya
      ananya last edited by ananya

      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 ?

      A ananya 2 Replies Last reply Reply Quote 0
      • A
        admin @ananya last edited by

        @ananya please follow below thread
        https://smartapi.angelbroking.com/topic/488/high-price-and-open-price-is-not-available-in-websocket-datastream?_=1638427131087

        ananya 2 Replies Last reply Reply Quote 0
        • ananya
          ananya @admin last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • ananya
            ananya @admin last edited by

            @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

            A 1 Reply Last reply Reply Quote 0
            • A
              admin @ananya last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • ananya
                ananya @ananya last edited by

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

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post