Allocation only for running bot

This commit is contained in:
2025-10-05 02:07:20 +07:00
parent 3581607375
commit cad70799b5
2 changed files with 2 additions and 27 deletions

View File

@@ -120,7 +120,7 @@ namespace Managing.Application.ManageBot
if (botConfig.BotTradingBalance > availableAllocation)
{
throw new InvalidOperationException(
$"Insufficient available allocation on account '{account.Name}'. Requested: {botConfig.BotTradingBalance:F2} USDC, Available: {availableAllocation:F2} USDC.");
$"Insufficient available allocation. Requested: {botConfig.BotTradingBalance:F2} USDC, Available: {availableAllocation:F2} USDC.");
}
var balanceCheckResult = await CheckAccountBalancesAsync(account);
@@ -397,6 +397,7 @@ namespace Managing.Application.ManageBot
foreach (var bot in botsForUser)
{
if (excludeIdentifier != default && bot.Identifier == excludeIdentifier)
if (bot.Status != BotStatus.Running)
{
continue;
}