From cb4847a6c9e308a901b50b60d55a1fc471ee4126 Mon Sep 17 00:00:00 2001 From: Marc Blatter Date: Thu, 9 Jul 2026 20:28:14 +0200 Subject: [PATCH] Bugfix: entry_time must be ISO string not datetime object (JSON serialization) (2026-07-09 20:28) --- src/main_ml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main_ml.py b/src/main_ml.py index e97b6e4..9572869 100644 --- a/src/main_ml.py +++ b/src/main_ml.py @@ -156,7 +156,7 @@ class TradingBotV03: 'entry_price': entry_price, 'qty': qty, 'order_id': order.get('orderId'), - 'entry_time': datetime.now() + 'entry_time': datetime.now().isoformat() } logger.info(f"BUY: {qty} {symbol} @ ${entry_price:.2f} (${qty*entry_price:.2f})") @@ -279,3 +279,4 @@ if __name__ == '__main__': bot.run() +