diff --git a/packages/cli/src/api/run-trading.ts b/packages/cli/src/api/run-trading.ts index f995068e..844b2e42 100644 --- a/packages/cli/src/api/run-trading.ts +++ b/packages/cli/src/api/run-trading.ts @@ -45,7 +45,7 @@ export async function runTrading( `Bot "${bot.label}" is already enabled. Cancelling previous orders...`, ); await stopBot(bot.id); - logger.info(`The bot state were cleared`); + logger.info(`The bot state was cleared`); } if (bot.processing) { diff --git a/packages/cli/src/utils/command.ts b/packages/cli/src/utils/command.ts index 3c7f12b0..57b54062 100644 --- a/packages/cli/src/utils/command.ts +++ b/packages/cli/src/utils/command.ts @@ -16,10 +16,7 @@ export function handle( logger.info(result); } } catch (error) { - console.error( - "Error:", - error instanceof Error ? error.message : "Unknown error", - ); + console.error(error); } }; } diff --git a/packages/processing/src/bot/bot.processing.ts b/packages/processing/src/bot/bot.processing.ts index 43ac25f5..7b5c1065 100644 --- a/packages/processing/src/bot/bot.processing.ts +++ b/packages/processing/src/bot/bot.processing.ts @@ -74,7 +74,7 @@ export class BotProcessing { market?: MarketData, ) { console.log( - `🤖 Bot #${this.bot.id} command=${command} candle=${JSON.stringify(market?.candle)} candlesHistory=${market?.candles.length} start`, + `🤖 Processing "${command}" command. Context { candle=${JSON.stringify(market?.candle)}, candlesHistory=${market?.candles.length || 0} }. Bot { id: ${this.bot.id}, name: ${this.bot.name} }`, ); if (this.isBotProcessing()) { console.warn( @@ -101,7 +101,9 @@ export class BotProcessing { } await xprisma.bot.setProcessing(false, this.bot.id); - console.log(`🤖 Bot #${this.bot.id} command=${command} finished`); + console.log( + `🤖 Processing "${command}" command finished. Bot { id: ${this.bot.id}, name: ${this.bot.name} }`, + ); } async processStartCommand() {