@ -105,7 +105,16 @@ class ORBTradingEngine:
chunk_size = 200
for i in range ( 0 , len ( tickers ) , chunk_size ) :
chunk = tickers [ i : i + chunk_size ]
raw_bars . update ( self . _broker . get_bars ( chunk , start , today ) )
try :
raw_bars . update ( self . _broker . get_bars ( chunk , start , today ) )
except Exception as e :
self . _log ( f " WARNING: daily bars chunk { i / / chunk_size + 1 } failed ( { e } ) — skipping " )
# Retry chunk symbol-by-symbol to isolate the bad ticker(s)
for sym in chunk :
try :
raw_bars . update ( self . _broker . get_bars ( [ sym ] , start , today ) )
except Exception :
self . _log ( f " Skipping invalid symbol: { sym } " )
daily_bars_dict = bars_to_enrichment_format ( raw_bars )
@ -137,13 +146,16 @@ class ORBTradingEngine:
chunk_size = 100
for i in range ( 0 , len ( tickers ) , chunk_size ) :
chunk = tickers [ i : i + chunk_size ]
chunk_bars = self . _broker . get_intraday_bars (
chunk ,
start = market_open ,
end = fetch_end ,
timeframe_minutes = 5 ,
)
intraday_raw . update ( chunk_bars )
try :
chunk_bars = self . _broker . get_intraday_bars (
chunk ,
start = market_open ,
end = fetch_end ,
timeframe_minutes = 5 ,
)
intraday_raw . update ( chunk_bars )
except Exception as e :
self . _log ( f " WARNING: intraday bars chunk { i / / chunk_size + 1 } failed ( { e } ) — skipping " )
bars_by_ticker = intraday_bars_to_format ( intraday_raw )
self . _log (