| | |
| | | |
| | | from trade import bidding_money_manager, trade_manager, l2_trade_util |
| | | from trade.l2_trade_util import BlackListCodeManager |
| | | import concurrent.futures |
| | | |
| | | |
| | | class DataServer(BaseHTTPRequestHandler): |
| | |
| | | __jingxuan_cache_dict = {} |
| | | __industry_cache_dict = {} |
| | | __latest_limit_up_codes_set = set() |
| | | __data_process_thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=10) |
| | | |
| | | def __get_limit_up_list(self): |
| | | # 统计目前为止的代码涨停数量(分涨停原因) |
| | |
| | | self.__kplDataManager.save_data(type_, result_list) |
| | | elif type_ == KPLDataType.LIMIT_UP.value: |
| | | result_list = kpl_util.parseDaBanData(data["data"], kpl_util.DABAN_TYPE_LIMIT_UP) |
| | | threading.Thread(target=lambda: do_limit_up(result_list), daemon=True).start() |
| | | self.__data_process_thread_pool.submit(lambda: do_limit_up(result_list)) |
| | | elif type_ == KPLDataType.OPEN_LIMIT_UP.value: |
| | | result_list = kpl_util.parseDaBanData(data["data"], kpl_util.DABAN_TYPE_OPEN_LIMIT_UP) |
| | | if result_list: |