Administrator
2023-07-14 8c462fa0ac904b9aba4ecac28b7b6a7712fa2a6e
华鑫适配
2个文件已修改
15 ■■■■ 已修改文件
trade/huaxin/trade_api_server.py 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/trade_server.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/trade_api_server.py
@@ -18,7 +18,7 @@
from trade import trade_manager, trade_huaxin
from trade.huaxin import huaxin_trade_api as trade_api, huaxin_trade_api, huaxin_trade_record_manager
from utils import socket_util, tool, huaxin_util
from utils import socket_util, tool, huaxin_util, data_export_util
trade_data_request_queue = queue.Queue()
@@ -262,6 +262,17 @@
                                fresults.append((code, code_name))
                        return_str = json.dumps(
                            {"code": 0, "data": {"count": len(fresults), "list": fresults}, "msg": ""})
                    elif type_ == "export_l2_data":
                        # 导出L2数据
                        code = data_json["data"]["code"]
                        try:
                            data_export_util.export_l2_excel(code)
                            return_str = json.dumps(
                                {"code": 0, "data": {}, "msg": ""})
                        except Exception as e:
                            logging.exception(e)
                            return_str = json.dumps(
                                {"code": 1,  "msg": str(e)})
                    # 查询委托列表
                    elif type_ == 'test':
                        # 卖出
trade/huaxin/trade_server.py
@@ -164,7 +164,7 @@
                            buy_progress_index = None
                            for d in datas:
                                buy_no = d[6]
                                if buy_no in buyno_map:
                                if buyno_map and buy_no in buyno_map:
                                    hx_logger_l2_transaction.info(f"{code}成交进度:{buyno_map[buy_no]}")
                                    buy_progress_index = buyno_map[buy_no]["index"]