Fix status bot allocation start/restart
This commit is contained in:
@@ -394,10 +394,17 @@ namespace Managing.Application.ManageBot
|
|||||||
var totalAllocatedForAccount = 0m;
|
var totalAllocatedForAccount = 0m;
|
||||||
var usdcBalance = account.Balances.FirstOrDefault(b => b.TokenName == Ticker.USDC.ToString());
|
var usdcBalance = account.Balances.FirstOrDefault(b => b.TokenName == Ticker.USDC.ToString());
|
||||||
|
|
||||||
|
Console.WriteLine($"Bots for user: {botsForUser.Count}");
|
||||||
|
Console.WriteLine($"Exclude identifier: {excludeIdentifier}");
|
||||||
|
|
||||||
foreach (var bot in botsForUser)
|
foreach (var bot in botsForUser)
|
||||||
{
|
{
|
||||||
if (excludeIdentifier != default && bot.Identifier == excludeIdentifier)
|
if (excludeIdentifier != default && bot.Identifier == excludeIdentifier)
|
||||||
if (bot.Status != BotStatus.Running)
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bot.Status == BotStatus.Stopped || bot.Status == BotStatus.Saved)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -407,6 +414,7 @@ namespace Managing.Application.ManageBot
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
config = await grain.GetConfiguration();
|
config = await grain.GetConfiguration();
|
||||||
|
Console.WriteLine($"Bot Balance: {config.BotTradingBalance}");
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user