volume_traded discrepancy

ANL
ANL edited November 20 in Python client
Hello @sujith
Total volume traded value will always increase, not decrease.
What I have observed is that the volume traded is reduced. How is it possible? Is it a glitch, or what I observed is wrong?
Also, sometimes the same value is duplicating multiple times. What is the reason for all this?

TIme: 19-Nov-2024 15.20.00
NIFTY24N2123500PE

Vol 1: 182324200
Vol 2: 182337150
Vol 3: 182324200 (decreased & repeating)
Vol4: 182342725
  • ANL
    Note: Multiple values are not a problem. Please ignore it.
  • vaibhavsharma13
    Is it happening in data from Websocket?
  • ANL
    Yes, it is happening for almost all tokens from webscoket.
  • vaibhavsharma13
    I have seen duplicate volume but never seen decreasing volume with Websocket data.
  • ANL
    Duplicates can happen in L2, but decreasing volume is strange.
  • rakeshr
    TIme: 19-Nov-2024 15.20.00
    NIFTY24N2123500PE

    Vol 1: 182324200
    Vol 2: 182337150
    Vol 3: 182324200 (decreased & repeating)
    Vol4: 182342725
    I just checked ticks log for the mentioned instrument and timestamp. The volume are in the correct order as per the exchange timestamp.
    eg: Volume1: 182324200 is at "2024-11-19T15:20:01"
    Volume3: 182324200 is at "2024-11-19T15:20:02"
    Volume2: 182337150 is at "2024-11-19T15:20:02"
    Volume4: 182342725 is at "2024-11-19T15:20:03"
    As, you can see vol 3, and vol 2, came at the same seconds, but in the correct order. You should store it accordingly in your db/store.
  • ANL
    I am using score as an exchange timestamp from Redis, so how could the order be incorrect?
  • ANL
    @rakeshr I have checked with TrueData ticks. I am using both Kite and Truedata, the same code I am using with Truedata, and I have been checking for 1 hour, and I am sure I am not getting volume-decreasing issues with Truedata.

    I am converting to Unix timestamp before storing any ticks, so Unix is so accurate and giving it as a score, so no way it shows out of order.
  • ANL
    I just checked ticks log for the mentioned instrument and timestamp.
    The log time and streaming tick time are the same in your system? or after streaming the ticks, then it stores and sorts the time in the logs?
  • ANL
    @sujith @rakeshr It would be helpful if you could reply to the query.
Sign In or Register to comment.