Add agent fees

This commit is contained in:
2025-09-28 20:57:42 +07:00
parent fd2387932e
commit 16a56bd26c
20 changed files with 108 additions and 166 deletions

View File

@@ -391,7 +391,7 @@ public class DataController : ControllerBase
try
{
// Get all agent summaries
var allAgentSummaries = await _mediator.Send(new GetAllAgentSummariesCommand("Total"));
var allAgentSummaries = await _mediator.Send(new GetAllAgentSummariesCommand());
// Filter agents with valid PnL data and order by PnL
var agentsWithPnL = allAgentSummaries
@@ -638,6 +638,7 @@ public class DataController : ControllerBase
ActiveStrategiesCount = agentSummary.ActiveStrategiesCount,
TotalVolume = agentSummary.TotalVolume,
TotalBalance = agentSummary.TotalBalance,
TotalFees = agentSummary.TotalFees,
};
agentSummaryViewModels.Add(agentSummaryViewModel);

View File

@@ -47,6 +47,11 @@ namespace Managing.Api.Models.Responses
/// Total balance including USDC and open position values (without leverage, including PnL)
/// </summary>
public decimal TotalBalance { get; set; }
/// <summary>
/// Total fees paid by this agent across all positions
/// </summary>
public decimal TotalFees { get; set; }
}
/// <summary>