feat: Add category performance, update WebUI and OpenRouter integration, fix bugs

This commit is contained in:
Richard
2026-07-05 14:13:16 +02:00
parent d102af2965
commit e9e9ce0d5a
30 changed files with 2302 additions and 54 deletions
@@ -0,0 +1,28 @@
using Predictalytics.Domain.Enums;
namespace Predictalytics.Domain.Entities;
public class TraderCategoryPerformance
{
public int Id { get; set; }
public int TraderId { get; set; }
public Trader Trader { get; set; } = null!;
public MarketCategory Category { get; set; }
/// <summary>Total volume traded in this category (USD).</summary>
public decimal TotalVolume { get; set; }
/// <summary>Total Profit/Loss in this category (USD).</summary>
public decimal TotalPnL { get; set; }
/// <summary>Number of trades in this category.</summary>
public int TotalTrades { get; set; }
/// <summary>Number of profitable trades in this category.</summary>
public int WinningTrades { get; set; }
/// <summary>Calculated win rate for this category (0.0 - 1.0).</summary>
public decimal WinRate => TotalTrades > 0 ? (decimal)WinningTrades / TotalTrades : 0;
}