A Java Spring Boot application which periodically updates database and serves statistics of this data
Scheduling for periodic execution
JPA Derived Query Methods for statistics
Same repository object used to create different (kline interval) collections of different parities
On first execution or if there is no DB or collection, there would be a little more wait for fetch process from earliest kline and complete DB.
Even if you interrupt this process in half, it will continue from where it left off in the next run.