Fix identifier for strat
This commit is contained in:
@@ -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,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -12,65 +11,67 @@ namespace Managing.Api.Models.Responses
|
|||||||
/// Name of the deployed strategy
|
/// Name of the deployed strategy
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Strategy identifier
|
/// Strategy identifier
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string StrategyName { get; set; }
|
public string StrategyName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Current state of the strategy (RUNNING, STOPPED, UNUSED)
|
/// Current state of the strategy (RUNNING, STOPPED, UNUSED)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string State { get; set; }
|
public string State { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Total profit or loss generated by the strategy in USD
|
/// Total profit or loss generated by the strategy in USD
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal PnL { get; set; }
|
public decimal PnL { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return on investment percentage
|
/// Return on investment percentage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal ROIPercentage { get; set; }
|
public decimal ROIPercentage { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return on investment percentage in the last 24 hours
|
/// Return on investment percentage in the last 24 hours
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal ROILast24H { get; set; }
|
public decimal ROILast24H { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Date and time when the strategy was started
|
/// Date and time when the strategy was started
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime Runtime { get; set; }
|
public DateTime Runtime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Average percentage of successful trades
|
/// Average percentage of successful trades
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int WinRate { get; set; }
|
public int WinRate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Total trading volume for all trades
|
/// Total trading volume for all trades
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal TotalVolumeTraded { get; set; }
|
public decimal TotalVolumeTraded { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Trading volume in the last 24 hours
|
/// Trading volume in the last 24 hours
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal VolumeLast24H { get; set; }
|
public decimal VolumeLast24H { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of winning trades
|
/// Number of winning trades
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Wins { get; set; }
|
public int Wins { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of losing trades
|
/// Number of losing trades
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Losses { get; set; }
|
public int Losses { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user