(self)
| 56 | self.symbol_data.symbol_candles = self.candles_managers_by_time_frame |
| 57 | |
| 58 | async def initialize_impl(self): |
| 59 | await self.data_importer.initialize() |
| 60 | self.exchange_name = self.data_importer.exchange_name |
| 61 | for time_frame in self.data_importer.time_frames: |
| 62 | for symbol in self.data_importer.symbols: |
| 63 | if symbol not in self.origin_ohlcv_by_symbol: |
| 64 | self.origin_ohlcv_by_symbol[symbol] = {} |
| 65 | db_data = await self.data_importer.get_ohlcv_from_timestamps( |
| 66 | exchange_name=self.exchange_name, |
| 67 | symbol=symbol, |
| 68 | time_frame=time_frame |
| 69 | ) |
| 70 | # store ohlcv only |
| 71 | self.origin_ohlcv_by_symbol[symbol][time_frame] = sorted( |
| 72 | [data[-1] for data in db_data], |
| 73 | key=lambda x: x[PriceIndexes.IND_PRICE_TIME.value] |
| 74 | ) |
| 75 | |
| 76 | async def stop(self): |
| 77 | await self.data_importer.stop() |
nothing calls this directly
no test coverage detected