You need to make sure that main thread on which you are receiving data isn't block by doing computation or writing to database. You can refer to this FAQs thread.
This is now working fine.. however what i notice is there is 10 sec lag between the price that ticks on the website and the one im getting in the websocket with LTP mode..will there be a delay from website to websocket?
No, there won't be any delay between the kite web marketwatch ticks and the kiteconnect websocket stream, both use the same source binary packet. Just make sure, you aren't blocking the main ticker thread, that can cause a delay in the ticks relay. This thread explains more.
does running 500 stocks in websocket at the same time would cause any delay
No, it won't. Are you sure about using the correct instrument token on websocket stream? Maybe paste here/DM me the websocket code, specifically the tick stream method (on_ticks)
You can refer to this FAQs thread.
Maybe paste here/DM me the websocket code, specifically the tick stream method (
on_ticks
)