Administrator
2023-07-14 8575c68db99128bd1f4c803b817508a39bf0c0ec
华鑫适配
1个文件已修改
18 ■■■■ 已修改文件
trade/huaxin/trade_api_server.py 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/trade_api_server.py
@@ -17,7 +17,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()
@@ -264,14 +264,14 @@
                    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)})
                        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':
                        # 卖出