| | |
| | | from third_data import kpl_data_manager |
| | | from third_data import kpl_data_manager, block_info, kpl_block_util |
| | | from third_data.code_plate_key_manager import CodePlateKeyBuyManager, LimitUpCodesPlateKeyManager |
| | | from third_data.kpl_util import KPLDataType |
| | | from utils import tool |
| | | |
| | | if __name__ == "__main__": |
| | | code = "002559" |
| | | latest_2_day_limit_up_datas_temp = kpl_data_manager.get_current_limit_up_data_records(2) |
| | | latest_2_day_limit_up_datas = [] |
| | | for d in latest_2_day_limit_up_datas_temp: |
| | | latest_2_day_limit_up_datas.extend(d[1]) |
| | | |
| | | code = "002655" |
| | | block_info.init() |
| | | current_limit_up_datas = kpl_data_manager.KPLDataManager().get_from_file(KPLDataType.LIMIT_UP, |
| | | tool.get_now_date_str()) |
| | | LimitUpCodesPlateKeyManager().set_today_limit_up([(d[0], d[5]) for d in current_limit_up_datas]) |
| | | |
| | | # LimitUpCodesPlateKeyManager().set_today_limit_up([(d[0], d[5]) for d in current_limit_up_datas]) |
| | | limit_up_record_datas = kpl_data_manager.KPLLimitUpDataRecordManager.list_all(tool.get_now_date_str()) |
| | | results = CodePlateKeyBuyManager.get_can_buy_block(code, current_limit_up_datas, latest_2_day_limit_up_datas, |
| | | limit_up_record_datas) |
| | | print(results) |
| | | for d in limit_up_record_datas: |
| | | block_info.init_code(d[3]) |
| | | kpl_block_util.is_record_top_block("002845", "芯片", limit_up_record_datas, 4) |
| | | print( kpl_block_util.is_current_top_block("002845", "芯片", current_limit_up_datas, 4)) |
| | | # results = CodePlateKeyBuyManager.get_can_buy_block(code, current_limit_up_datas, |
| | | # limit_up_record_datas, block_info.get_before_blocks_dict()) |
| | | # print(results) |