Fix allocated amount when no bot

This commit is contained in:
2025-10-05 01:00:47 +07:00
parent 5468b1e7f7
commit 63683d6bdf
4 changed files with 52 additions and 41 deletions

View File

@@ -25,7 +25,7 @@ public interface IBotService
Task<IEnumerable<TradingBotConfig>> GetBotConfigsByIdsAsync(IEnumerable<Guid> botIds);
Task<bool> UpdateBotStatisticsAsync(Guid identifier);
Task<bool> SaveBotStatisticsAsync(Bot bot);
/// <summary>
/// Computes the remaining available USDC allocation for the provided account,
/// subtracting the sum of BotTradingBalance from other bots using the same account.
@@ -35,7 +35,7 @@ public interface IBotService
/// <param name="excludeIdentifier">Bot identifier to exclude from allocation sum.</param>
/// <returns>Available USDC amount that can be allocated.</returns>
Task<decimal> GetAvailableAllocationUsdAsync(Account account, Guid excludeIdentifier = default);
/// <summary>
/// Gets paginated bots with filtering and sorting
/// </summary>