start txt export from dash

This commit is contained in:
Dobromir Popov
2025-08-26 21:31:18 +03:00
parent b404191ffa
commit 300cf3eb2c
8 changed files with 239 additions and 59 deletions

View File

@@ -33,6 +33,7 @@ class TextExportManager:
'main_symbol': 'ETH/USDT',
'ref1_symbol': 'BTC/USDT',
'ref2_symbol': 'SPX', # Will need to be mapped to available data
'ref3_symbol': 'SOL/USDT',
'export_dir': 'NN/training/samples/txt'
}
@@ -54,7 +55,8 @@ class TextExportManager:
export_dir=self.export_config['export_dir'],
main_symbol=self.export_config['main_symbol'],
ref1_symbol=self.export_config['ref1_symbol'],
ref2_symbol=self.export_config['ref2_symbol']
ref2_symbol=self.export_config['ref2_symbol'],
ref3_symbol=self.export_config.get('ref3_symbol', 'SOL/USDT')
)
logger.info("Text data exporter initialized successfully")
@@ -198,16 +200,8 @@ class EnhancedDataProviderWrapper:
def _get_spx_data(self) -> Optional[Dict[str, Any]]:
"""Get SPX data - placeholder for now"""
# For now, return mock SPX data
# In production, this would connect to a stock data provider
return {
'open': 5500.0,
'high': 5520.0,
'low': 5495.0,
'close': 5510.0,
'volume': 1000000,
'timestamp': datetime.now()
}
# No synthetic data allowed; return None if not available
return None
# Integration helper functions
def setup_text_export(data_provider=None, orchestrator=None, config: Optional[Dict[str, Any]] = None) -> TextExportManager: