ls증권 히스토리 구독 넣음

This commit is contained in:
Your Name
2026-07-30 18:05:07 +09:00
parent 61bec4bd1d
commit 67eab24603
1593 changed files with 135733 additions and 1232 deletions

View File

@@ -25,8 +25,14 @@ class _FakeDB:
def __init__(self, rows: List[Dict]):
self._rows = rows
def get_universe_at(self, *, strategy_id: str, at_time: str) -> List[Dict]:
eligible = [r for r in self._rows if r["event_time"] <= at_time]
def get_universe_at(
self, *, strategy_id: str, at_time: str, history_source: str = "kiwoom",
) -> List[Dict]:
eligible = [
r for r in self._rows
if r["event_time"] <= at_time
and r.get("strategy_id", strategy_id) == strategy_id
]
if not eligible:
return []
et = max(r["event_time"] for r in eligible)