Kotak-Neo / kotak-neo-api

96 stars 80 forks source link

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

Closed Thushar-marvel closed 8 months ago

Thushar-marvel commented 8 months 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 8 months 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 8 months 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