how to get ticker in sequence?

m80l
I have added 5-6 tokens,
tickerProvider.subscribe(instrument_token); ...where instruent_token is ArrayList.

When received the tics data
System.out.println("LTP: "+ticks.get(0).getLastTradedPrice());

at index 0 why the price is always different?
how to receive ticks data in sequence as given in instruent_token is ArrayList?
  • sujith
    You need to check the instrument token provided in each tick to map data to a corresponding instrument token.
  • m80l
    Also, why is it that when I ask for e.g. 6 tokens data, first ticks.size() is 6 & afterward it is the random size & not in the same sequence as defined in Array list, so why can't we receive every time at least complete ticks.size() as requested? As of now first I have to manage the size & then to map each tick. Can you please paste some sample code to handle this?
  • sujith
    You can check out the WebSocket queries section on the FAQs.
  • m80l
    thnx, solved.
This discussion has been closed.