Fix close position

This commit is contained in:
2025-05-12 13:07:43 +07:00
parent 0cf523c144
commit 4b0e87d48e
7 changed files with 20 additions and 16 deletions

View File

@@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
using static Managing.Common.Enums;
using ApplicationTradingBot = Managing.Application.Bots.TradingBot;
using ApiTradingBot = Managing.Api.Models.Responses.TradingBot;
namespace Managing.Api.Controllers;
@@ -454,7 +453,7 @@ public class BotController : BaseController
}
var activeBots = _botService.GetActiveBots();
var bot = activeBots.FirstOrDefault(b => b.Identifier == request.Identifier) as ApplicationTradingBot;
var bot = activeBots.FirstOrDefault(b => b.Identifier == request.Identifier);
if (bot == null)
{
@@ -498,7 +497,7 @@ public class BotController : BaseController
}
var activeBots = _botService.GetActiveBots();
var bot = activeBots.FirstOrDefault(b => b.Identifier == request.Identifier) as ApplicationTradingBot;
var bot = activeBots.FirstOrDefault(b => b.Identifier == request.Identifier);
if (bot == null)
{