websocket data coming in unordered fashion

Imran
i have subscribed to many instruments at a time
ws.subscribe([53490695,53477639,53429511,53515783,53564935,53646343, 140033, 424961,3924993, 3924993, 3876097, 511233, 3057409])

but the output response only comes when the price of an instrument changes
thus leading to problem in indexing ..'
how do we solve it

  • sujith
    You can use instrument token as the key.
    If you are writing to the database then use multithreading. Make sure you are not blocking the main thread.
  • arthite
    can you help me with multitreading code for handling more stock so that it does not get mixed while stroing it in excel or mysql
Sign In or Register to comment.