-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add all candles to client.rest.on #343
Comments
Hi @artdevgame, I am happy to hear that you like the project. The current architecture allows only to get the latest candle. You can subscribe to Would that be doable for you? |
Hey @bennycode I'm using the demo here: Here we retrieve all candles and assign to a variable called At the moment, the body of the callback (https://github.com/bennycode/coinbase-pro-node/blob/main/src/demo/rest-watch-candles.ts#L13) in my version is pushing I don't like that my callback is now causing side effects, and would like to solve that somehow, like how Another way I could solve it is to have the |
@artdevgame, I see your use case now. From my point of view, pushing incoming candles to the existing I wouldn't like to store all fetched candles in the memory of "coinbase-pro-node", because it would consume memory even in applications which don't have your use case and it would go beyond the concerns of a REST API. In your case using an application state container, like Redux, could be a good idea to manage your candles and handle side effects. What do you think? |
Hey @bennycode, happy new year. I'm ok pushing to I'll close the ticket. Thanks for the feedback. |
Hello,
Thanks for developing this project.
Would it be possible to add the updated
Candles[]
array to this callback please: https://github.com/bennycode/coinbase-pro-node/blob/main/src/demo/rest-watch-candles.ts#L12I would like to know the full candle history from when I called
client.rest.product.getCandles
up until the latest tick.The text was updated successfully, but these errors were encountered: