diff --git a/src/exchanges/base.py b/src/exchanges/base.py index ab067c1..025d3ab 100644 --- a/src/exchanges/base.py +++ b/src/exchanges/base.py @@ -19,7 +19,11 @@ class BaseExchange(abc.ABC): def fetch_latest_trades(self) -> List[Trade]: pass - @property @abc.abstractmethod def name(self) -> str: pass + + def fetch_trades_generator(self, **kwargs): + """Standard generator implementation that yields batches from fetch_latest_trades. + Subclasses should override this if they can stream data more efficiently.""" + yield self.fetch_latest_trades(**kwargs)