Navigation

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

    Different LTP on on_data() and ltpData()

    Test
    0
    3
    31
    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.
    • D
      Deepanshu last edited by

      While using on_data() to receive ticks for a token, I am getting different value for last_traded_price as compared to what is actually going on in the market. While if I am using the ltpData(), it is giving the exact price. Why on_data() is giving some strange price?

      For eg-
      for a token on_data() is giving last_traded_price': 56430. (56430/100 = 564.30)

      {'subscription_mode': 3, 'exchange_type': 2, 'token': '37033', 'sequence_number': 48718658, 'exchange_timestamp': 1717148865000, 'last_traded_price': 56430, 'subscription_mode_val': 'SNAP_QUOTE', 'last_traded_quantity': 25, 'average_traded_price': 51901, 'volume_trade_for_the_day': 3799425, 'total_buy_quantity': 35800.0, 'total_sell_quantity': 32600.0, 'open_price_of_the_day': 53495, 'high_price_of_the_day': 57500, 'low_price_of_the_day': 46500, 'closed_price': 51535, 'last_traded_timestamp': 1717148864, 'open_interest': 238500, 'open_interest_change_percentage': -4605506619295321194, 'upper_circuit_limit': 95090, 'lower_circuit_limit': 20955, '52_week_high_price': 98795, '52_week_low_price': 0, 'best_5_buy_data': [{'flag': 1, 'quantity': 150, 'price': 56460, 'no of orders': 1}, {'flag': 1, 'quantity': 100, 'price': 56455, 'no of orders': 2}, {'flag': 1, 'quantity': 25, 'price': 56450, 'no of orders': 1}, {'flag': 1, 'quantity': 75, 'price': 56445, 'no of orders': 1}, {'flag': 1, 'quantity': 300, 'price': 56440, 'no of orders': 3}], 'best_5_sell_data': [{'flag': 0, 'quantity': 125, 'price': 56575, 'no of orders': 1}, {'flag': 0, 'quantity': 200, 'price': 56580, 'no of orders': 1}, {'flag': 0, 'quantity': 75, 'price': 56585, 'no of orders': 1}, {'flag': 0, 'quantity': 75, 'price': 56590, 'no of orders': 1}, {'flag': 0, 'quantity': 200, 'price': 56595, 'no of orders': 2}], 'datetime': '2024-05-31 15:33:00'}

      while smartApi.ltpData("NFO", "", "37033")["data"]["ltp"] is giving 550.0

      And this is not only for some ticks, I am observing this problem from few days.

      M 2 Replies Last reply Reply Quote 0
      • M
        Moderator_3 @Deepanshu last edited by

        Hello @Deepanshu

        We will rise this ticket to our tech team and we will get back to you soon

        Regards,
        SmartAPI Team

        1 Reply Last reply Reply Quote 0
        • M
          Moderator_3 @Deepanshu last edited by

          Hi @Deepanshu Apologies for delay response. This issue caused on api side on that day. Kindly check and update from your end still this happening every time or occasionally this issue.

          Regards,
          SmartAPI Team.

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