Administrator
2023-07-21 2e446a927eef17bfcad365fd40d561a50b486a98
bug修复
1个文件已修改
6 ■■■■ 已修改文件
trade/trade_huaxin.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/trade_huaxin.py
@@ -6,7 +6,7 @@
import constant
from db.redis_manager import RedisManager
from log_module.log import logger_juejin_trade
from log_module.log import logger_juejin_trade, hx_logger_trade_debug
from trade.huaxin import huaxin_trade_api
from utils import tool, huaxin_util
from l2 import huaxin
@@ -66,11 +66,11 @@
    try:
        result = huaxin_trade_api.order(1, code, count, price)
        print("华鑫下单耗时", time.time() - start_time)
        logger_juejin_trade.info(f"{code}:下单耗时{round(time.time() - start_time, 3)}s")
        hx_logger_trade_debug.info(f"{code}:下单耗时{round(time.time() - start_time, 3)}s")
    except Exception as e:
        if str(e).find("超时") >= 0:
            # 此处出现超时,需要通过读取委托列表来设置订单信息
            pass
            hx_logger_trade_debug.error(f"{code}:下单结果反馈出错-{str(e)}")
        else:
            raise e