Fix identifier for strat

This commit is contained in:
2025-05-13 15:28:27 +07:00
parent 621a5a745e
commit 503a442c6b
2 changed files with 17 additions and 15 deletions

View File

@@ -422,7 +422,8 @@ public class DataController : ControllerBase
Wins = wins, Wins = wins,
Losses = losses, Losses = losses,
Positions = strategy.Positions.OrderByDescending(p => p.Date) Positions = strategy.Positions.OrderByDescending(p => p.Date)
.ToList() // Include sorted positions with most recent first .ToList(), // Include sorted positions with most recent first
Identifier = strategy.Identifier,
}; };
} }

View File

@@ -1,5 +1,4 @@
using Managing.Domain.Trades; using Managing.Domain.Trades;
using static Managing.Common.Enums;
namespace Managing.Api.Models.Responses namespace Managing.Api.Models.Responses
{ {
@@ -72,5 +71,7 @@ namespace Managing.Api.Models.Responses
/// List of all positions executed by this strategy /// List of all positions executed by this strategy
/// </summary> /// </summary>
public List<Position> Positions { get; set; } = new List<Position>(); public List<Position> Positions { get; set; } = new List<Position>();
public string Identifier { get; set; }
} }
} }