From 3a619104611fff5023d073c55321a750f4d26859 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Mon, 30 Mar 2026 20:54:27 +0800 Subject: [PATCH] 1 --- .../crypto_agent/executor/paper_trading_executor.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/backend/app/crypto_agent/executor/paper_trading_executor.py b/backend/app/crypto_agent/executor/paper_trading_executor.py index 0c10102..bd4d4a6 100644 --- a/backend/app/crypto_agent/executor/paper_trading_executor.py +++ b/backend/app/crypto_agent/executor/paper_trading_executor.py @@ -147,17 +147,13 @@ class PaperTradingExecutor(BaseExecutor): success_count = 0 total_pnl = 0 for order_id in orders_to_close: - result = self.paper_trading.close_order( + result = self.paper_trading.close_order_manual( order_id=order_id, - close_price=current_price, - close_reason='manual' + exit_price=current_price ) - if result.get('success'): + if result: success_count += 1 - # 计算盈亏 - order = result.get('order') - if order: - total_pnl += order.realized_pnl + total_pnl += result.get('pnl_amount', 0) result = { 'success': success_count > 0,