bennycode/coinbase-pro-node

granularity for websockets

Closed this issue · 1 comments

Hello!

I need stats for 1 hour to generate a dynamic candle, is there any way to adjust for granularity with the websocket connection"?

Hi @kenchambers, you can define the granularity of the candles that you are watching:

https://github.com/bennycode/coinbase-pro-node/blob/v6.0.0/src/product/ProductAPI.ts#L256

There is the availability to choose CandleGranularity.ONE_HOUR.