| | |
| | | source_origin_dict = copy.deepcopy(CodeThirdBlocksManager().get_source_blocks_origin(code)) |
| | | if not source_origin_dict: |
| | | source_origin_dict = {} |
| | | kpl_blocks = KPLCodeJXBlockManager().get_jx_blocks_radical(code) |
| | | kpl_blocks = RadicalBuyBlockManager.get_code_kpl_blocks(code) |
| | | if kpl_blocks is None: |
| | | kpl_blocks = set() |
| | | if not kpl_blocks: |
| | |
| | | return True, "" |
| | | |
| | | @classmethod |
| | | def get_code_blocks(cls, code): |
| | | """ |
| | | 获取目标代码的板块 |
| | | @param code: |
| | | @return: 过滤后的板块,过滤前的板块 |
| | | """ |
| | | def get_code_kpl_blocks(cls, code): |
| | | blocks = KPLCodeJXBlockManager().get_jx_blocks_radical(code) |
| | | if blocks is None: |
| | | blocks = set() |
| | |
| | | keys = TargetCodePlateKeyManager().get_plate_keys(code, contains_today=False) |
| | | if keys and keys[0]: |
| | | blocks |= set(keys[0]) |
| | | return blocks |
| | | |
| | | @classmethod |
| | | def get_code_blocks(cls, code): |
| | | """ |
| | | 获取目标代码的板块 |
| | | @param code: |
| | | @return: 过滤后的板块,过滤前的板块 |
| | | """ |
| | | blocks = cls.get_code_kpl_blocks(code) |
| | | match_blocks, info = CodeThirdBlocksManager().get_intersection_blocks_info(code, blocks) |
| | | match_blocks -= constant.KPL_INVALID_BLOCKS |
| | | fblocks = match_blocks & RealTimeKplMarketData.get_top_market_jingxuan_blocks() |
| | |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | print() |
| | | print(getLimitUpInfoNew()) |
| | | |
| | | # __getConceptBK("300564") |
| | |
| | | log.close_print() |
| | | while True: |
| | | try: |
| | | if (tool.is_trade_time() and int(tool.get_now_time_str().replace(':', '')) > int("092530")): |
| | | if (tool.is_trade_time() and int(tool.get_now_time_str().replace(':', '')) > int("092530")) or True: |
| | | results = kpl_api.getLimitUpInfoNew() |
| | | result = json.loads(results) |
| | | start_time = time.time() |