Add reason when stopping bot

This commit is contained in:
2025-10-10 23:31:32 +07:00
parent d9ffadfe2b
commit d71d47f644
5 changed files with 13 additions and 10 deletions

View File

@@ -1889,9 +1889,10 @@ public class TradingBotBase : ITradingBot
/// <summary>
/// Handles bot stopping and notifies platform summary
/// </summary>
public async Task StopBot()
public async Task StopBot(string reason = null)
{
await LogInformation($"🛑 Bot Stopped\nBot: `{Config.Name}`\nTicker: `{Config.Ticker}`");
await LogInformation(
$"🛑 Bot Stopped\nBot: `{Config.Name}`\nTicker: `{Config.Ticker}`\nReason: `{reason ?? "No reason provided"}`");
}
public async Task LogInformation(string message)