44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using Managing.Domain.Accounts;
|
|
using Managing.Domain.Bots;
|
|
using Managing.Domain.Candles;
|
|
using Managing.Domain.Indicators;
|
|
using Managing.Domain.Trades;
|
|
using static Managing.Common.Enums;
|
|
|
|
namespace Managing.Application.Abstractions
|
|
{
|
|
public interface ITradingBot
|
|
{
|
|
TradingBotConfig Config { get; set; }
|
|
Account Account { get; set; }
|
|
Dictionary<string, LightSignal> Signals { get; set; }
|
|
Dictionary<Guid, Position> Positions { get; set; }
|
|
Dictionary<DateTime, decimal> WalletBalances { get; set; }
|
|
DateTime PreloadSince { get; set; }
|
|
int PreloadedCandlesCount { get; set; }
|
|
long ExecutionCount { get; set; }
|
|
Candle LastCandle { get; set; }
|
|
|
|
Task Run();
|
|
Task StopBot(string reason = null);
|
|
Task LoadAccount();
|
|
Task LoadLastCandle();
|
|
Task<LightSignal> CreateManualSignal(TradeDirection direction);
|
|
|
|
/// <summary>
|
|
/// Gets the current trading bot configuration.
|
|
/// </summary>
|
|
/// <returns>A copy of the current configuration</returns>
|
|
TradingBotConfig GetConfiguration();
|
|
|
|
/// <summary>
|
|
/// Updates the trading bot configuration with new settings.
|
|
/// </summary>
|
|
/// <param name="newConfig">The new configuration to apply</param>
|
|
/// <returns>True if the configuration was successfully updated, false otherwise</returns>
|
|
Task<bool> UpdateConfiguration(TradingBotConfig newConfig);
|
|
|
|
Task LogInformation(string message);
|
|
Task LogWarning(string message);
|
|
}
|
|
} |