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
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
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.
Update time: 1ms
Update time: 0ms
Update time: 0ms
Update time: 0ms
Update time: 1ms
Update time: 0ms
Update time: 0ms
Update time: 1ms
You seems to be using wrong exchange here
NSE:BANKNIFTY20JUNFUT
,it should beNFO:
instead. We are logging volume data at our end for some time, to monitor the discrepancy if any.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.