From e7fec7ae234f6ebb8f08e6608eec939bf12bb04e Mon Sep 17 00:00:00 2001 From: z <1837800317@qq.com> Date: Sat, 29 Aug 2026 20:44:01 +0800 Subject: [PATCH] fix: drop unexpected market_type kwarg at LiveOrderPhaseAdapter call site d169c03 added market_type= to the LiveOrderPhaseAdapter(...) call in the pending-order execution phase, but LiveOrderPhaseAdapter.__init__ never accepted it. Every strategy-generated live auto-order (all exchanges, spot and swap) therefore crashed with TypeError at final placement and was marked failed: Unexpected order error (binance BNB/USDT open_long): LiveOrderPhaseAdapter.__init__() got an unexpected keyword argument 'market_type' The adapter takes market_type from the OrderIntent in every method (place_market_order / place_limit_order / cancel_order / wait_for_fill); the kwarg was unused. Remove it from the call site. Reproduced on v5.0.1-beta (commit 21f1fb6) with the exact worker kwargs; no test covered this call site (test_live_exchange_fees.py constructs the adapter without the kwarg). --- backend_api_python/app/services/pending_order_worker.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backend_api_python/app/services/pending_order_worker.py b/backend_api_python/app/services/pending_order_worker.py index bbdd27ae4..b1e4af8ac 100644 --- a/backend_api_python/app/services/pending_order_worker.py +++ b/backend_api_python/app/services/pending_order_worker.py @@ -2094,7 +2094,6 @@ def _execute_live_order(self, *, order_id: int, order_row: Dict[str, Any], paylo adapter = LiveOrderPhaseAdapter( client=client, exchange_id=exchange_id, - market_type=market_type, payload=payload, exchange_config=exchange_config, order_mode=order_mode,