This commit is contained in:
Dobromir Popov
2025-10-22 17:48:44 +03:00
parent 68b91f37bd
commit f456b2747e
5 changed files with 127 additions and 7 deletions

View File

@@ -57,6 +57,8 @@ from .huobi_cob_websocket import get_huobi_cob_websocket
from .cob_integration import COBIntegration
from .report_data_crawler import ReportDataCrawler, ReportData
logger = logging.getLogger(__name__)
# Import unified storage components (optional)
try:
from .unified_data_provider_extension import UnifiedDataProviderExtension
@@ -65,8 +67,6 @@ except ImportError:
UNIFIED_STORAGE_AVAILABLE = False
logger.warning("Unified storage components not available")
logger = logging.getLogger(__name__)
@dataclass
class PivotBounds:
"""Pivot-based normalization bounds derived from Williams Market Structure"""
@@ -184,11 +184,8 @@ class DataProvider:
# COB collection state guard to prevent duplicate starts
self._cob_started: bool = False
# Ensure COB collection is started so BaseDataInput includes real order book data
try:
self.start_cob_collection()
except Exception as _cob_init_ex:
logger.error(f"Failed to start COB collection at init: {_cob_init_ex}")
# COB collection is started via start_cob_websocket_integration() below
# No need to call start_cob_collection() here
self.is_streaming = False
self.data_lock = Lock()