prediction database

This commit is contained in:
Dobromir Popov
2025-09-02 19:25:42 +03:00
parent 226a6aa047
commit fe6763c4ba
5 changed files with 523 additions and 8 deletions

View File

@@ -341,8 +341,23 @@ class CleanTradingDashboard:
'status': 'healthy',
'dashboard_running': True,
'orchestrator_active': hasattr(self, 'orchestrator'),
'enhanced_training_active': hasattr(self.orchestrator, 'enhanced_training_system') and self.orchestrator.enhanced_training_system is not None,
'timestamp': datetime.now().isoformat()
})
@self.app.server.route('/api/predictions/stats', methods=['GET'])
def get_prediction_stats():
"""Get model prediction statistics"""
try:
if (hasattr(self.orchestrator, 'enhanced_training_system') and
self.orchestrator.enhanced_training_system):
stats = self.orchestrator.enhanced_training_system.get_model_performance_stats()
return jsonify(stats)
else:
return jsonify({"error": "Training system not available"}), 503
except Exception as e:
logger.error(f"Error getting prediction stats: {e}")
return jsonify({"error": str(e)}), 500
def _get_ohlcv_data_with_indicators(self, symbol: str, timeframe: str, limit: int = 300):
"""Get OHLCV data with technical indicators from data stream monitor"""