Administrator
2024-06-11 d43324dc63caf60409ea9e5727e673fa5641591e
bug修复
2个文件已修改
18 ■■■■ 已修改文件
third_data/kpl_data_manager.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin_trade_data_update.py 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/kpl_data_manager.py
@@ -496,7 +496,7 @@
        log.close_print()
        while True:
            try:
                if (tool.is_trade_time() and int(tool.get_now_time_str().replace(':', '')) > int("092530")) or True:
                if (tool.is_trade_time() and int(tool.get_now_time_str().replace(':', '')) > int("092530")):
                    results = kpl_api.getLimitUpInfoNew()
                    result = json.loads(results)
                    start_time = time.time()
trade/huaxin_trade_data_update.py
@@ -74,10 +74,10 @@
                        if dataJSON["code"] == 0:
                            data = dataJSON["data"]
                            huaxin_trade_record_manager.MoneyManager.save_data(data)
                            if data:
                                usefulMoney = data[0]["usefulMoney"]
                                # 设置可用资金
                                trade_manager.AccountAvailableMoneyManager().set_available_money(0, usefulMoney)
                            # if data:
                            #     usefulMoney = data[0]["usefulMoney"]
                            #     # 设置可用资金
                            #     trade_manager.AccountAvailableMoneyManager().set_available_money(0, usefulMoney)
                            # 设置可用资金
                    elif type_ == "deal_list":
                        dataJSON = huaxin_trade_api.get_deal_list(timeout=10)
@@ -85,14 +85,6 @@
                        if dataJSON["code"] == 0:
                            datas = dataJSON["data"]
                            huaxin_trade_record_manager.DealRecordManager.add(datas)
                            if datas:
                                tempList = [
                                    {"time": d["tradeTime"], "type": int(d['direction']), "code": d['securityID']}
                                    for d in datas]
                                try:
                                    trade_manager.process_trade_success_data(tempList)
                                except Exception as e:
                                    logging.exception(e)
                    # 持仓股
                    elif type_ == "position_list":
                        dataJSON = huaxin_trade_api.get_position_list()