| | |
| | | import random |
| | | import socket |
| | | import socketserver |
| | | import threading |
| | | import time |
| | | |
| | | import constant |
| | | |
| | | from code_attribute import gpcode_manager |
| | | from l2 import l2_data_manager_new, l2_log, code_price_manager |
| | | from l2.huaxin import huaxin_target_codes_manager |
| | | from log_module.log import hx_logger_l2_upload, hx_logger_contact_debug, hx_logger_trade_callback, \ |
| | | hx_logger_l2_orderdetail, hx_logger_l2_transaction, hx_logger_trade_debug, hx_logger_l2_market_data |
| | | hx_logger_l2_orderdetail, hx_logger_l2_transaction, hx_logger_l2_market_data |
| | | |
| | | from trade.huaxin import huaxin_trade_api as trade_api, huaxin_trade_api, huaxin_trade_record_manager |
| | | from utils import socket_util |
| | | from trade.huaxin import huaxin_trade_api as trade_api, trade_api_server |
| | | |
| | | trade_data_request_queue = queue.Queue() |
| | | |
| | |
| | | hx_logger_trade_callback.info(data_json) |
| | | sk.sendall(json.dumps({"code": 0}).encode(encoding='utf-8')) |
| | | # 重新请求委托列表与资金 |
| | | trade_data_request_queue.put_nowait({"type": "delegate_list"}) |
| | | trade_data_request_queue.put_nowait({"type": "money"}) |
| | | trade_data_request_queue.put_nowait({"type": "deal_list"}) |
| | | trade_api_server.trade_data_request_queue.put_nowait({"type": "delegate_list"}) |
| | | trade_api_server.trade_data_request_queue.put_nowait({"type": "money"}) |
| | | trade_api_server.trade_data_request_queue.put_nowait({"type": "deal_list"}) |
| | | # print("响应结果:", data_json['data']) |
| | | elif data_json["type"] == "l2_order": |
| | | # L2逐笔委托 |