rebuild(stage-5): establish market data gateway and charts

This commit is contained in:
leefer
2026-07-30 02:35:42 +08:00
parent 40ad5d6836
commit cf0ab7026f
45 changed files with 2701 additions and 46 deletions
+24
View File
@@ -0,0 +1,24 @@
from __future__ import annotations
from typing import Protocol
from backend.data.contracts import DataSource, ProviderResult
class ProviderError(RuntimeError):
pass
class MarketDataProvider(Protocol):
source: DataSource
@property
def configured(self) -> bool: ...
def calendar(self, start_date: str, end_date: str) -> ProviderResult: ...
def entities(self) -> ProviderResult: ...
def daily(self, entity_type: str, identifier: str, end_date: str) -> ProviderResult: ...
def minute(self, entity_type: str, identifier: str, trade_date: str) -> ProviderResult: ...