coinbase / coinbase-pro-node

DEPRECATED — The official Node.js library for Coinbase Pro
Apache License 2.0
844 stars 316 forks source link

Feature request : depth of the orderbook #315

Closed machard closed 6 years ago

machard commented 6 years ago

Hi, Processing a full orderbook take some cpu power and is not useful when we only care about the first levels. Do you plan to allow subscribers to level2 orderbook to pass a depth parameter ? Thank you

fb55 commented 6 years ago

There is no work being done to add a depth parameter, but we have talked about adding a level 1 channel before. Would that be what you want? In this case, you would always now the best bid and ask.

machard commented 6 years ago

@fb55 would be good yes!

machard commented 6 years ago

@fb55 any timeline ?

machard commented 6 years ago

@fb55 ?

fb55 commented 6 years ago

The ticker channel already provides the best ask and bid, but groups matches. A proper level 1 channel could be provided at some point, but this should work for a lot of cases.

machard commented 6 years ago

@fb55 problem with ticker channel is that it seems to be delayed and suffer big lags sometimes. I see clearly the difference between level2 feeds and ticker. I just monitor Date.now() - msg.time on my side to see this

capture d ecran 2018-08-14 a 11 27 02

On the graph above I switched at 11.20 half of my stream (the USD ones) to ticker and you can clearly see the lags

machard commented 6 years ago

@fb55 actually, I just discovered the undocumented level2_50 channel that you use in the UI. Which is already a good improvement