Fix Runtime
This commit is contained in:
@@ -499,6 +499,9 @@ public class DataController : ControllerBase
|
||||
NetPnL = strategy.NetPnL,
|
||||
ROIPercentage = strategy.Roi,
|
||||
Runtime = strategy.Status == BotStatus.Running ? strategy.LastStartTime : null,
|
||||
LastStartTime = strategy.LastStartTime,
|
||||
LastStopTime = strategy.LastStopTime,
|
||||
AccumulatedRunTimeSeconds = strategy.AccumulatedRunTimeSeconds,
|
||||
TotalRuntimeSeconds = strategy.GetTotalRuntimeSeconds(),
|
||||
WinRate = winRate,
|
||||
TotalVolumeTraded = totalVolume,
|
||||
|
||||
@@ -42,6 +42,21 @@ namespace Managing.Api.Models.Responses
|
||||
/// </summary>
|
||||
public long TotalRuntimeSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time when the current or last session started
|
||||
/// </summary>
|
||||
public DateTime? LastStartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time when the last session stopped (null if currently running)
|
||||
/// </summary>
|
||||
public DateTime? LastStopTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Total accumulated runtime across all past sessions (seconds)
|
||||
/// </summary>
|
||||
public long AccumulatedRunTimeSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Average percentage of successful trades
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user