diff --git a/src/dexorder/ohlc.py b/src/dexorder/ohlc.py index 74f9e1d..0c16429 100644 --- a/src/dexorder/ohlc.py +++ b/src/dexorder/ohlc.py @@ -352,13 +352,13 @@ class OHLCRepository: # recent_ohlcs holds a list of "recent" NativeOHLC's stored as blockdata. we try to keep the recent array long # enough to extend prior the root block time historical: Optional[list[NativeOHLC]] = recent_ohlcs.get(key) - log.debug(f'got recent {historical}') + # log.debug(f'got recent {historical}') if not historical: if create is False or price is None: return # do not track symbols which have not been explicity set up historical = [] updated = [NativeOHLC(ohlc_start_time(time, period), price, price, price, price)] - log.debug(f'\tcreated new bars {updated}') + # log.debug(f'\tcreated new bars {updated}') else: updated = update_ohlc(historical[-1], period, time, price) # drop any historical bars that are older than we need @@ -377,7 +377,7 @@ class OHLCRepository: first_updated = updated[0].start overlap = (first_updated - last_bar) // period + 1 updated = historical[:-overlap] + updated if overlap > 0 else historical + updated - log.debug(f'\tnew recents: {updated}') + # log.debug(f'\tnew recents: {updated}') recent_ohlcs.setitem(key, updated) return updated