| | |
| | | return |
| | | cls.__latest_process_order_unique_keys[code] = unique_key |
| | | |
| | | # S撤 |
| | | def s_cancel(_buy_single_index, _buy_exec_index): |
| | | _start_time = round(t.time() * 1000) |
| | | # S撤单计算,看秒级大单撤单 |
| | | try: |
| | | b_need_cancel, b_cancel_msg = cls.__SCancelBigNumComputer.need_cancel_for_down(code, start_index, |
| | | end_index) |
| | | if b_need_cancel: |
| | | async_log_util.error(logger_debug, f"{code} S后撤单:{b_cancel_msg}") |
| | | return total_data[end_index], f"S后撤({b_cancel_msg})" |
| | | # return None, "" |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | async_log_util.error(logger_l2_error, |
| | | f"S撤出错 参数:buy_single_index-{_buy_single_index} buy_exec_index-{_buy_exec_index}") |
| | | async_log_util.exception(logger_l2_error, e) |
| | | finally: |
| | | # l2_data_log.l2_time(code, round(t.time() * 1000) - _start_time, |
| | | # "已下单-s级大单估算") |
| | | pass |
| | | return None, "" |
| | | |
| | | # H撤 |
| | | def h_cancel(_buy_single_index, _buy_exec_index): |
| | | _start_time = round(t.time() * 1000) |