| | |
| | | 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, data_export_util |
| | | from utils import socket_util, tool, huaxin_util |
| | | |
| | | trade_data_request_queue = queue.Queue() |
| | | |
| | |
| | | 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': |
| | | # 卖出 |