Volume blip observed in getQuote API

sivakrishna538
Hi,
Every second I am sequentially collecting NSE:BANKNIFTY20JUNFUT volume using getQuote API. Today(11-Jun-2020), I observed that at times volume is less than the previous second volume. As per the description volume can only go up but never down. This happened twice today. Please find the volume ticks below around the instance 13:34:10
5516620
5516620
5515860 - Suspicious volume tick
5516620
5517780

My question is, can we expect this to happen some times during the day? If not we can conclude that there is a bug in my application.
@rakeshr @sujith

Cheers,
Siva
  • sujith
    Do you make any calculations or it is just a dump?
  • sivakrishna538
    As of now I am just using ltp of the Quote for calculations. Volume, I am just saving in a list using a synchronized block. All this work is done is less than a milli-second. Attaching sample logs, which prints entire time taken for save + calculations.
    Update time: 1ms
    Update time: 0ms
    Update time: 0ms
    Update time: 0ms
    Update time: 1ms
    Update time: 0ms
    Update time: 0ms
    Update time: 1ms
  • rakeshr
    @sivakrishna538
    You seems to be using wrong exchange here NSE:BANKNIFTY20JUNFUT,it should be NFO: instead.
    I observed that at times volume is less than the previous second volume. As per the description volume can only go up but never down.
    We are logging volume data at our end for some time, to monitor the discrepancy if any.
  • sivakrishna538
    Thanks for pointing out @rakeshr . It's a typo from my end. I am using NFO:BANKNIFTY20JUNFUT.
  • rakeshr
    rakeshr edited June 2020
    @sivakrishna538
    We are logging volume data at our end for some time, to monitor the discrepancy if any.
    We logged and checked on more than 10k Quote call data for NFO:BANKNIFTY20JUNFUT at our end, and didn't find the issue of current tick volume being lesser than the previous tick on any. Few of them were equal(because of no trade at that second) but none were lesser.
    Make sure that, there are no race conditions at your end, while computing.
  • sivakrishna538
    Yes. I too logged Quote's timestamp, and there seems no issues. We can close this thread. Thanks!!!
This discussion has been closed.