Administrator
2023-08-16 6199fd57e1650cba50fba67c7f9b69d716722af3
++++++++++++++++
取消不必要的并行计算框架
2个文件已修改
8 ■■■■■ 已修改文件
l2/l2_data_manager_new.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/huaxin_trade_api.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py
@@ -1161,6 +1161,8 @@
            #                                          buy_single_index,
            #                                          buy_exec_index, False)
            l2_log.debug(code, "记录执行买入数据结束")
            _start_time = l2_data_log.l2_time(code, tool.get_now_timestamp() - _start_time,
                                              "记录执行买入数据", force=True)
@@ -1188,6 +1190,7 @@
                                                         compute_index, total_datas, is_first_code,
                                                         cls.volume_rate_info[code][1],
                                                         cls.volume_rate_info[code][1], False)
                l2_log.debug(code, "S级大单处理")
                _start_time = l2_data_log.l2_time(code, tool.get_now_timestamp() - _start_time,
                                                  "S级大单处理耗时", force=True)
@@ -1206,7 +1209,6 @@
                _start_time = l2_data_log.l2_time(code, tool.get_now_timestamp() - _start_time,
                                                  f"处理撤单步骤耗时,范围:{compute_index + 1}-{compute_end_index}", force=True)
        else:
            # 未达到下单条件,保存纯买额,设置纯买额
            # 记录买入信号位置
trade/huaxin/huaxin_trade_api.py
@@ -247,7 +247,7 @@
# volume:交易量
# price:价格(如果是卖时不传价格就按照5挡价卖)
# blocking是否阻塞进程
def order(direction, code, volume, price, price_type=2, blocking=True, sinfo=None, request_id=None):
def order(direction, code, volume, price, price_type=2, blocking=False, sinfo=None, request_id=None):
    timestamp = round(time.time() * 1000)
    if not sinfo:
        sinfo = f"b_{code}_{timestamp}"
@@ -271,7 +271,7 @@
        return {"local_order_id": local_order_id}
def cancel_order(direction, code, orderSysID, localOrderID=None, blocking=True, sinfo=None, request_id=None):
def cancel_order(direction, code, orderSysID, localOrderID=None, blocking=False, sinfo=None, request_id=None):
    if not sinfo:
        sinfo = f"cb_{code}_{round(time.time() * 1000)}"
    request_id = __request(ClientSocketManager.CLIENT_TYPE_TRADE,