MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / initialize_impl

Method initialize_impl

tests/test_utils/data_bank.py:58–74  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 2

initializeMethod · 0.45

Tested by

no test coverage detected