ls증권 히스토리 구독 넣음
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user