Update plateform summary
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Managing.Common;
|
||||
|
||||
namespace Managing.Api.Models.Responses
|
||||
{
|
||||
/// <summary>
|
||||
@@ -9,39 +11,39 @@ namespace Managing.Api.Models.Responses
|
||||
/// AgentName of the agent
|
||||
/// </summary>
|
||||
public string AgentName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total profit and loss in USD
|
||||
/// </summary>
|
||||
public decimal TotalPnL { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total return on investment as a percentage
|
||||
/// </summary>
|
||||
public decimal TotalROI { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Number of winning trades
|
||||
/// </summary>
|
||||
public int Wins { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Number of losing trades
|
||||
/// </summary>
|
||||
public int Losses { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Number of active strategies for this agent
|
||||
/// </summary>
|
||||
public int ActiveStrategiesCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total volume traded by this agent in USD
|
||||
/// </summary>
|
||||
public decimal TotalVolume { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Platform-wide statistics without individual agent details
|
||||
/// </summary>
|
||||
@@ -51,96 +53,96 @@ namespace Managing.Api.Models.Responses
|
||||
/// Total number of agents on the platform
|
||||
/// </summary>
|
||||
public required int TotalAgents { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total number of active strategies across all agents
|
||||
/// </summary>
|
||||
public required int TotalActiveStrategies { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total platform-wide profit and loss in USD
|
||||
/// </summary>
|
||||
public required decimal TotalPlatformPnL { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total volume traded across all agents in USD
|
||||
/// </summary>
|
||||
public required decimal TotalPlatformVolume { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total volume traded across all agents in the last 24 hours in USD
|
||||
/// </summary>
|
||||
public required decimal TotalPlatformVolumeLast24h { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total open interest across all positions in USD
|
||||
/// </summary>
|
||||
public required decimal TotalOpenInterest { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Total number of open positions across all strategies
|
||||
/// </summary>
|
||||
public required int TotalPositionCount { get; set; }
|
||||
|
||||
|
||||
// 24-hour changes
|
||||
/// <summary>
|
||||
/// Change in agent count over the last 24 hours
|
||||
/// </summary>
|
||||
public required int AgentsChange24h { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Change in strategy count over the last 24 hours
|
||||
/// </summary>
|
||||
public required int StrategiesChange24h { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Change in PnL over the last 24 hours
|
||||
/// </summary>
|
||||
public required decimal PnLChange24h { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Change in volume over the last 24 hours
|
||||
/// </summary>
|
||||
public required decimal VolumeChange24h { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Change in open interest over the last 24 hours
|
||||
/// </summary>
|
||||
public required decimal OpenInterestChange24h { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Change in position count over the last 24 hours
|
||||
/// </summary>
|
||||
public required int PositionCountChange24h { get; set; }
|
||||
|
||||
|
||||
// Breakdowns
|
||||
/// <summary>
|
||||
/// Volume breakdown by asset/ticker
|
||||
/// </summary>
|
||||
public required Dictionary<string, decimal> VolumeByAsset { get; set; }
|
||||
|
||||
public required Dictionary<Enums.Ticker, decimal> VolumeByAsset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Position count breakdown by asset/ticker
|
||||
/// </summary>
|
||||
public required Dictionary<string, int> PositionCountByAsset { get; set; }
|
||||
|
||||
public required Dictionary<Enums.Ticker, int> PositionCountByAsset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Position count breakdown by direction (Long/Short)
|
||||
/// </summary>
|
||||
public required Dictionary<string, int> PositionCountByDirection { get; set; }
|
||||
|
||||
public required Dictionary<Enums.TradeDirection, int> PositionCountByDirection { get; set; }
|
||||
|
||||
// Metadata
|
||||
/// <summary>
|
||||
/// When the data was last updated
|
||||
/// </summary>
|
||||
public required DateTime LastUpdated { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// When the last 24-hour snapshot was taken
|
||||
/// </summary>
|
||||
public required DateTime Last24HourSnapshot { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Response model containing a list of agent summaries for the agent index
|
||||
/// </summary>
|
||||
@@ -150,10 +152,10 @@ namespace Managing.Api.Models.Responses
|
||||
/// List of agent summaries sorted by performance
|
||||
/// </summary>
|
||||
public List<AgentSummaryViewModel> AgentSummaries { get; set; } = new List<AgentSummaryViewModel>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Time filter applied to the data
|
||||
/// </summary>
|
||||
public string TimeFilter { get; set; } = "Total";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,32 @@ namespace Managing.Api.Models.Responses
|
||||
public decimal PnL { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a high-performing strategy with its name and ROI value
|
||||
/// </summary>
|
||||
public class StrategyRoiPerformance
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the strategy bot
|
||||
/// </summary>
|
||||
public string StrategyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Return on Investment percentage of the strategy
|
||||
/// </summary>
|
||||
public decimal Roi { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Profit and Loss value of the strategy
|
||||
/// </summary>
|
||||
public decimal PnL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Volume traded by the strategy
|
||||
/// </summary>
|
||||
public decimal Volume { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// View model containing the top performing strategies by ROI
|
||||
/// </summary>
|
||||
@@ -26,4 +52,15 @@ namespace Managing.Api.Models.Responses
|
||||
/// </summary>
|
||||
public List<StrategyPerformance> TopStrategies { get; set; } = new List<StrategyPerformance>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// View model containing the top performing strategies by ROI
|
||||
/// </summary>
|
||||
public class TopStrategiesByRoiViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// List of the top performing strategies by ROI
|
||||
/// </summary>
|
||||
public List<StrategyRoiPerformance> TopStrategiesByRoi { get; set; } = new List<StrategyRoiPerformance>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user