| | |
| | | accountID = data["accountID"] |
| | | orderSysID = data["orderSysID"] |
| | | sinfo = data["sinfo"] |
| | | async_log_util.info(logger_trade, f"API撤单: {data}") |
| | | if orderSysID: |
| | | result = huaxin_trade_api.cancel_order(direction, code, orderSysID, sinfo=sinfo, |
| | | blocking=True, request_id=request_id) |
| | |
| | | msg_list.append(f"无法撤买单") |
| | | else: |
| | | msg_list.append(f"已撤买单") |
| | | async_log_util.info(logger_trade, f"API撤单结果: {msg_list}") |
| | | self.send_response({"code": 0, "data": {"code": 0, "msg": ";".join(msg_list)}}, client_id, |
| | | request_id) |
| | | except Exception as e: |
| | |
| | | # 判断最近有没有涨停卖数据 |
| | | limit_up_sell_count = L2TradeSingleDataProcessor.get_latest_limit_up_sell_order_count(code) |
| | | if (limit_up_sell_count == 0 or active_buy_blocks) and not single: |
| | | |
| | | # 如果没有涨停卖数据/积极下单而且还没有成交买入信号,就按照原来的总卖额计算 |
| | | threshold_money, sell_1_price = copy.deepcopy(refer_sell_data[1]), refer_sell_data[3][0] |
| | | for i in range(start_index - 1, -1, -1): |
| | |
| | | valid_single=False) |
| | | if buy_single_index is not None: |
| | | return True, buy_single_index, [refer_sell_data[0], |
| | | threshold_money], "上板无涨停卖", OrderBeginPosInfo.MODE_ACTIVE if active_buy_blocks else OrderBeginPosInfo.MODE_NORMAL |
| | | threshold_money], f"上板无涨停卖:涨停卖数据-{limit_up_sell_count}", OrderBeginPosInfo.MODE_ACTIVE if active_buy_blocks else OrderBeginPosInfo.MODE_NORMAL |
| | | |
| | | else: |
| | | # 按照成交买入信号计算 |