To clarify, you don't need to save the ticks. You just need to keep the one incomplete bar and adjust high/low/close with each tick. After that you don't need the ticks anymore.
toggle quoted message
Show quoted text
On 6/15/2021 5:07 PM, Nick wrote:
Historical keep up to date will certainly work but it's rather chatty as you saw.. Try using one of the other realtime data streams instead. It's not that hard to accumulate data into 30sec bar and detect a new bar.
You don't need to save each tick to a database. Save the ticks until you get a new bar and then add the bar to the database.
So first request the historical data and then start the realtime data going.
On 6/15/2021 3:41 PM, Patrick C wrote:
1. Pull all the old historical data (once and done)
then seperately
2. Pull the current candle uptodate data into its own function. (endless)