fix NPE
This commit is contained in:
parent
c94f226fbc
commit
6c3afde1b2
@ -197,13 +197,13 @@ class RealTraderManager:
|
||||
def check_and_retry(self, order_id, strategy_name, code, direction, amount, available_retry_count=1):
|
||||
position_manager = self.trader.get_position_manager(strategy_name)
|
||||
order_info = position_manager.get_pending_order(order_id)
|
||||
filled = order_info.filled
|
||||
target_amount = order_info.amount
|
||||
|
||||
if not order_info:
|
||||
logger.warning(f"订单信息不存在: ID={order_id}")
|
||||
return
|
||||
|
||||
filled = order_info.filled
|
||||
target_amount = order_info.amount
|
||||
|
||||
order_type = order_info.order_type
|
||||
status = self._update_order_status(order_id, strategy_name)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user