third_data/kpl_api.py
@@ -3,6 +3,7 @@ import requests import constant from utils import middle_api_protocol # 竞价 @@ -135,5 +136,13 @@ if __name__ == "__main__": start = time.time() print(getZYLTAmount("000333"), time.time() - start) blocks = getCodeJingXuanBlocks("002362") if len(blocks) > 2: # 根据涨幅排序 blocks.sort(key=lambda x: x[2]) blocks.reverse() datas = [] for b in blocks: if b[2] > 0 and b[1] not in constant.KPL_INVALID_BLOCKS: datas.append(b) print(datas)