add more log for pending order checking
This commit is contained in:
parent
49bd92296e
commit
1a4d8cd11e
@ -53,7 +53,7 @@ class Config:
|
||||
MAIL_TO = ["jq@yushaoyou.com"] # 可以是多个邮箱
|
||||
|
||||
# RealTraderManager配置
|
||||
RTM_ORDER_TIMEOUT = 30 # 订单超时时间(秒)
|
||||
RTM_ORDER_TIMEOUT = 10 # 订单超时时间(秒)
|
||||
RTM_USE_MARKET_ORDER = True # 是否使用市价单进行补单
|
||||
|
||||
# 计划任务运行时间
|
||||
|
@ -188,6 +188,7 @@ class RealTraderManager:
|
||||
if order_info.order_type == ORDER_TYPE_LIMIT:
|
||||
duration = (datetime.now() - order_info.created_time).total_seconds()
|
||||
if duration > Config.RTM_ORDER_TIMEOUT:
|
||||
logger.info(f'订单创建时间: {order_info.created_time} 当前时间: {datetime.now()}')
|
||||
logger.info(f"限价单超时: ID={order_id}, 策略={strategy_name}, 持续时间={duration}秒")
|
||||
self.trader.cancel(order_id)
|
||||
time.sleep(3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user