This commit is contained in:
2025-06-05 01:17:15 +07:00
parent 973a8c7c61
commit 6441687df3
12 changed files with 281 additions and 198 deletions

View File

@@ -1,5 +1,4 @@
using Managing.Application.Bots;
using Managing.Domain.Bots;
using Managing.Domain.Bots;
using Managing.Domain.Workflows;
namespace Managing.Application.Abstractions
@@ -7,6 +6,22 @@ namespace Managing.Application.Abstractions
public interface IBotFactory
{
IBot CreateSimpleBot(string botName, Workflow workflow);
/// <summary>
/// Creates a trading bot using the unified TradingBot class
/// </summary>
/// <param name="config">The trading bot configuration</param>
/// <returns>ITradingBot instance</returns>
ITradingBot CreateTradingBot(TradingBotConfig config);
/// <summary>
/// Creates a trading bot for backtesting using the unified TradingBot class
/// </summary>
/// <param name="config">The trading bot configuration</param>
/// <returns>ITradingBot instance configured for backtesting</returns>
ITradingBot CreateBacktestTradingBot(TradingBotConfig config);
// Legacy methods - these will use TradingBot internally but maintain backward compatibility
ITradingBot CreateScalpingBot(TradingBotConfig config);
ITradingBot CreateBacktestScalpingBot(TradingBotConfig config);
ITradingBot CreateFlippingBot(TradingBotConfig config);

View File

@@ -15,6 +15,21 @@ public interface IBotService
void StartBotFromBackup(BotBackup backupBot);
BotBackup GetBotBackup(string identifier);
/// <summary>
/// Creates a trading bot using the unified TradingBot class
/// </summary>
/// <param name="config">The trading bot configuration</param>
/// <returns>ITradingBot instance</returns>
ITradingBot CreateTradingBot(TradingBotConfig config);
/// <summary>
/// Creates a trading bot for backtesting using the unified TradingBot class
/// </summary>
/// <param name="config">The trading bot configuration</param>
/// <returns>ITradingBot instance configured for backtesting</returns>
ITradingBot CreateBacktestTradingBot(TradingBotConfig config);
// Legacy methods - these will use TradingBot internally but maintain backward compatibility
ITradingBot CreateScalpingBot(TradingBotConfig config);
ITradingBot CreateBacktestScalpingBot(TradingBotConfig config);
ITradingBot CreateFlippingBot(TradingBotConfig config);