Clear a bit more

This commit is contained in:
2025-08-05 19:34:42 +07:00
parent 0c8c3de807
commit 2dcbcc3ef2
9 changed files with 143 additions and 136 deletions

View File

@@ -32,6 +32,7 @@ public class DataController : ControllerBase
private readonly IAccountService _accountService;
private readonly ICacheService _cacheService;
private readonly IStatisticService _statisticService;
private readonly IAgentService _agentService;
private readonly IHubContext<CandleHub> _hubContext;
private readonly IMediator _mediator;
private readonly ITradingService _tradingService;
@@ -51,6 +52,7 @@ public class DataController : ControllerBase
IAccountService accountService,
ICacheService cacheService,
IStatisticService statisticService,
IAgentService agentService,
IHubContext<CandleHub> hubContext,
IMediator mediator,
ITradingService tradingService)
@@ -59,6 +61,7 @@ public class DataController : ControllerBase
_accountService = accountService;
_cacheService = cacheService;
_statisticService = statisticService;
_agentService = agentService;
_hubContext = hubContext;
_mediator = mediator;
_tradingService = tradingService;
@@ -664,7 +667,7 @@ public class DataController : ControllerBase
DateTime startDate,
DateTime? endDate = null)
{
var balances = await _statisticService.GetAgentBalances(agentName, startDate, endDate);
var balances = await _agentService.GetAgentBalances(agentName, startDate, endDate);
return Ok(balances);
}
@@ -683,7 +686,7 @@ public class DataController : ControllerBase
int page = 1,
int pageSize = 10)
{
var (agents, totalCount) = await _statisticService.GetBestAgents(startDate, endDate, page, pageSize);
var (agents, totalCount) = await _agentService.GetBestAgents(startDate, endDate, page, pageSize);
var response = new BestAgentsResponse
{