Kotak-Neo / kotak-neo-api

120 stars 112 forks source link

What is the difference between client.quotes and client.subscribe? #90

Closed Thushar-marvel closed 1 year ago

Thushar-marvel commented 1 year ago

I wanted to know the exact difference between client.quotes() and client.subscribe()? if i run client.quotes() in a continous loop, will this be same as client.subscribe()? also let me know the complexity of these 2 functions, which one has low latency? Thank you

Prrix commented 1 year ago

no client.quotes() works on get method and thus carries a latency while subscribe works on websocket that is way faster though implementation is a little quirky also client.quotes() happens to fault on data sometimes

Thushar-marvel commented 1 year ago

no client.quotes() works on get method and thus carries a latency while subscribe works on websocket that is way faster though implementation is a little quirky also client.quotes() happens to fault on data sometimes

Thank you @Prrix