Not sure someone else facing difficulty due to this but i am in a state not able to figure out how to filter LTQ that i have already been received seconds ago and no new trade happened yet !
For instance i received the following quote at 12:00PM :-
100 RPOWER @ 52.25
and if no trade happened for about 60 seconds i will be receiving the same above quote as LTP/LTQ for that 60 second time , which is correct and it should happen that way , but if i am using this data for chart then it will add-up 100 quantity as last traded qty @ 45.25 until next trade happens , so on my chart there will be 100x60=6000 qty for that 60 seconds but in reality only 100 quantity was traded in the exchange but because i received the same data for 60 times i have 6000 !
my question is that ,i am using C#/.Net custom app to get quote not official Python/PHP/Java etc.. so are the quotes being sent as and when new trade happens ?, or its just a stream every second/millisecond with the latest available data ? Is there anyway to get time-stamp with the quote to filter out said accumulation issue ? or do we need to implement such a time-stamp system at our end ?
@Shabeershah2002 We implement our own timestamp for Kite charts so for now its recommend to implement on your side. We are also considering to send timestamp with ticks but can't give you ETA on that.
unfortunately thats not a good news !, will wait for the Timestamp with quote as i cant figure out how to implement a timestamp at my end and filter out duplicate trade data , if I do so will have to ignore similar trade happened in a series of seconds , For instance : 20160101100000 - CRUDEOIL Traded @ 3000 - 1 Qty 20160101100001 - CRUDEOIL Traded @ 3000 - 1 Qty 20160101100003 - CRUDEOIL Traded @ 3000 - 1 Qty
for above example assume first 2 are real trades happened and last one is the same trade of second one in that case i have timestamp different for them but still they are duplicate data received until next trade happened !!
Thank you for that. Charting is not possible until we get time-stamp with the quote as i dont see any ways to have this at my end (as explained above) so holding everything until you bring a good news......
Hi Sameer, I was talking about the streaming data not historical one. the streaming data you get duplicates until next trade happens which cannot be used for charting as it will accumulate and have wrong volume bars !! i have experienced this by comparing Kite live Charts,
Hi Shabeer and Kailash, If tick occurs at time "t1" kite pushes that tick data over web socket ... Why they are pushing it again at time "t2" where t2 > t1 WHEN no trade happened between t1->t2 and no trade happened at t2 ? User can simply cache tick data of "t1" ... Is that BUG in Kite, I dont see any usecase of pushing same data again(even if they are pushing with Timestanp in new fix)
Hi @sameer I think user @maravinthkumar has given a brilliant answer to it. You can simply use timestamp at your end along with @maravinthkumar's approach to filter your actual LTP against non-traded LTPs.
yes , looks like maravinthkumar idea will work out , will test and lets see ............ thank you soumyadeep for making me to think about it once more !!,
Super........ Thanks to everyone , this idea never came in to my mind , as maravinthkumar suggested you can use latest volume traded comparing to the previous one you received which is 16 - 20 byte in the quote packet (detailed on the API doc) I just used a condition without any timestamp something like
IF LAST_VOLUME < CURRENT_RECEIVED_VOLUME then UPDATE MY CHART.
I dont see any benefit using a timestamp with this but do let me know if you really think 'yes' we should use timestamp with TotalVolume for the day to compare, because total volume is always total as it increases only but no decrease so when ever there is new trade no doubt the volume is gone up !!!
I think its time to close this discussion ...........
For instance :
20160101100000 - CRUDEOIL Traded @ 3000 - 1 Qty
20160101100001 - CRUDEOIL Traded @ 3000 - 1 Qty
20160101100003 - CRUDEOIL Traded @ 3000 - 1 Qty
for above example assume first 2 are real trades happened and last one is the same trade of second one in that case i have timestamp different for them but still they are duplicate data received until next trade happened !!
Charting is not possible until we get time-stamp with the quote as i dont see any ways to have this at my end (as explained above) so holding everything until you bring a good news......
If tick occurs at time "t1" kite pushes that tick data over web socket ... Why they are pushing it again at time "t2" where t2 > t1 WHEN no trade happened between t1->t2 and no trade happened at t2 ?
User can simply cache tick data of "t1" ... Is that BUG in Kite, I dont see any usecase of pushing same data again(even if they are pushing with Timestanp in new fix)
thank you soumyadeep for making me to think about it once more !!,
cheers
I just used a condition without any timestamp something like
IF LAST_VOLUME < CURRENT_RECEIVED_VOLUME then UPDATE MY CHART.
I dont see any benefit using a timestamp with this but do let me know if you really think 'yes' we should use timestamp with TotalVolume for the day to compare,
because total volume is always total as it increases only but no decrease so when ever there is new trade no doubt the volume is gone up !!!
I think its time to close this discussion ...........