Navigation

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

    Data format issue with websocket V2 version

    Python SDK
    0
    5
    84
    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.
    • S
      smitshahfo last edited by

      @admin
      This is the data am receiving from websocket V2, after including the change suggested by @rajanprabu.

      The data seems to be not in proper format. "exchange_timestamp": 1668665016000. How should i decode it..
      and the prices of tickers are not showing the decimal values. its showing as integer value.. including decimal points.

      Please fix the issues ASAP.

      78b22267-3a82-4e90-9dee-a69242137b1d-image.png

      punit 1 Reply Last reply Reply Quote 1
      • punit
        punit @smitshahfo last edited by

        @vrkhyd This is how it was defined in the spec document. not an issue.

        For price you can divide by 100. below is from the V2 doc.

        "All prices are in paise. For currencies, the int 32 price values should be divided by 10000000.0 to obtain four decimal places. For everything else, the price values should be divided by 100."

        For the timestamp, it is in the format of epoch millisecond.

        Eg: datetime.fromtimestamp(1668665016777/1000)

        Regards
        Ashok.

        S L 2 Replies Last reply Reply Quote 0
        • S
          smitshahfo @punit last edited by

          @Ashok
          Thank you Ashok.
          Could get the formats right.

          1 Reply Last reply Reply Quote 0
          • L
            laskshmi @punit last edited by

            @Ashok
            Where is the V2 document that u are mentioning here, can you share the link ?

            S 1 Reply Last reply Reply Quote 0
            • S
              smitshahfo @laskshmi last edited by

              @laskshmi
              its available here.
              Websocket 2.0 Documentation https://drive.google.com/drive/u/1/folders/1GMwTMfxRdiloUziV4DYwlYchGXbOvTfL

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