Bugfix: entry_time must be ISO string not datetime object (JSON serialization) (2026-07-09 20:28)

This commit is contained in:
Marc Blatter 2026-07-09 20:28:14 +02:00
parent 095800adf3
commit cb4847a6c9
1 changed files with 2 additions and 1 deletions

View File

@ -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()