prediction database
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user