Navigation

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

    Wrong LTP data

    General Discussion
    0
    4
    21
    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.
    • B
      bansal3amardeep last edited by

      I have created a web socket connection using smartApiWebSocketV2 but in the LTP prices I see the decimal missing.
      Is it uniform for all the cases, If so I can put decimal myself.
      Sample Output:-
      [I 240320 10:10:37 423236241:3] Ticks: {'subscription_mode': 2, 'exchange_type': 3, 'token': '500325', 'sequence_number': 3512686, 'exchange_timestamp': 1710909637000, 'last_traded_price': 286315, 'subscription_mode_val': 'QUOTE', 'last_traded_quantity': 1, 'average_traded_price': 286121, 'volume_trade_for_the_day': 31509, 'total_buy_quantity': 33072.0, 'total_sell_quantity': 187950.0, 'open_price_of_the_day': 285105, 'high_price_of_the_day': 287390, 'low_price_of_the_day': 284805, 'closed_price': 285075}

      A P M 3 Replies Last reply Reply Quote 0
      • A
        ashigro @bansal3amardeep last edited by

        @bansal3amardeep I believe this is the case for all, even I am converting the incoming stream to decimal value in my code.

        1 Reply Last reply Reply Quote 0
        • P
          perceptron @bansal3amardeep last edited by

          @bansal3amardeep you have to divide it by 100. This is the general case for all.

          1 Reply Last reply Reply Quote 0
          • M
            Moderator_2 @bansal3amardeep last edited by

            Hi @bansal3amardeep

            It is not uniform for all cases, decimal changes according to the segment. For cash segment, for the request you have initiated, LTP needs to be divided by 100 to convert into rupees.

            Regards,
            SmartAPI team

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