Fix Runtime by adding TotalRuntimeInSeconds
This commit is contained in:
@@ -498,7 +498,8 @@ public class DataController : ControllerBase
|
||||
PnL = strategy.Pnl,
|
||||
NetPnL = strategy.NetPnL,
|
||||
ROIPercentage = strategy.Roi,
|
||||
Runtime = strategy.StartupTime,
|
||||
Runtime = strategy.Status == BotStatus.Running ? strategy.LastStartTime : null,
|
||||
TotalRuntimeSeconds = strategy.GetTotalRuntimeSeconds(),
|
||||
WinRate = winRate,
|
||||
TotalVolumeTraded = totalVolume,
|
||||
VolumeLast24H = volumeLast24h,
|
||||
|
||||
@@ -33,9 +33,14 @@ namespace Managing.Api.Models.Responses
|
||||
public decimal ROIPercentage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date and time when the strategy was started
|
||||
/// Date and time when the strategy was started (only present when running, for live ticker)
|
||||
/// </summary>
|
||||
public DateTime Runtime { get; set; }
|
||||
public DateTime? Runtime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Total accumulated runtime in seconds (including current session if running)
|
||||
/// </summary>
|
||||
public long TotalRuntimeSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Average percentage of successful trades
|
||||
|
||||
Reference in New Issue
Block a user