++++++++++++++++
取消不必要的并行计算框架
| | |
| | | # 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) |
| | | |
| | |
| | | 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) |
| | |
| | | |
| | | _start_time = l2_data_log.l2_time(code, tool.get_now_timestamp() - _start_time, |
| | | f"处理撤单步骤耗时,范围:{compute_index + 1}-{compute_end_index}", force=True) |
| | | |
| | | else: |
| | | # 未达到下单条件,保存纯买额,设置纯买额 |
| | | # 记录买入信号位置 |
| | |
| | | # 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}" |
| | |
| | | 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, |