Add backtest light

This commit is contained in:
2025-07-17 05:19:16 +07:00
parent 6a634eafaa
commit 27bed791c3
16 changed files with 181 additions and 270 deletions

View File

@@ -179,7 +179,21 @@ public class BacktestController : BaseController
var response = new PaginatedBacktestsResponse
{
Backtests = backtests,
Backtests = backtests.Select(b => new LightBacktestResponse
{
Id = b.Id,
Config = b.Config,
FinalPnl = b.FinalPnl,
WinRate = b.WinRate,
GrowthPercentage = b.GrowthPercentage,
HodlPercentage = b.HodlPercentage,
StartDate = b.StartDate,
EndDate = b.EndDate,
MaxDrawdown = b.MaxDrawdown,
Fees = b.Fees,
SharpeRatio = b.SharpeRatio,
Score = b.Score
}),
TotalCount = totalCount,
CurrentPage = page,
PageSize = pageSize,
@@ -229,7 +243,21 @@ public class BacktestController : BaseController
var response = new PaginatedBacktestsResponse
{
Backtests = backtests,
Backtests = backtests.Select(b => new LightBacktestResponse
{
Id = b.Id,
Config = b.Config,
FinalPnl = b.FinalPnl,
WinRate = b.WinRate,
GrowthPercentage = b.GrowthPercentage,
HodlPercentage = b.HodlPercentage,
StartDate = b.StartDate,
EndDate = b.EndDate,
MaxDrawdown = b.MaxDrawdown,
Fees = b.Fees,
SharpeRatio = b.SharpeRatio,
Score = b.Score
}),
TotalCount = totalCount,
CurrentPage = page,
PageSize = pageSize,