Mock trading data polluting web socket and historical feed

@Hardik /Dhan Your mock trading session data needs to be purged from historical feeds because it fills the websocket and historical feeds with spurious data, throwing off calculations on indicators , and disrupting algos. They have to be discarded as soon as the session is over. I spent hours wasting my time because your historical feed is packed with rubbish data. Pl confirm that you have a mechanism for this and let me know at what point after the session does this purge take place.

@Sunil_S2 A curious question as I am building a websocket listener myself. What is the reason that the websocket is not programmed to discard the data received over weekends?

Hey @nitishbangera @Sunil_S2

This is something which we will take up. Right now, across Dhan products, data is streamed on mock trading days, and it is cleared once the mock trading is over.

This is done to ensure anyone testing downstream can do the same. Also, given we test our downstream products too on the mock trading day as well. You can simply keep a day check for now.

@Hardik Before the websocket starts sending the data for a given day, can the Dhan platform send a notification message for the data type i.e. MOCK, MARKET etc. Based on this, any listener running for that day can decide to whether to discard or to save it for actual analysis.

Hey Nitish,

Will look into implementing this. Meanwhile, you can simply keep a check on day and accordingly store at your end.

@Hardik I am aware and I have already mentioned this in my first comment in this thread i.e. discard the data received over weekends. But a clean way for a websocket implementation is for the vendor to provide this data. This feature flag would be the same which you use to show the notification on web.dhan.co for mock trading.