huaxin_client/l2_data_manager.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
trade/huaxin/huaxin_trade_api.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
trade/huaxin/huaxin_trade_data_update.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
trade/huaxin/trade_api_server.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
trade/huaxin/trade_server.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
huaxin_client/l2_data_manager.py
@@ -324,10 +324,12 @@ t = threading.Thread(target=lambda: __run_upload_order(code, _l2_data_callback), daemon=True) t.start() __upload_order_threads[code] = t logger_local_huaxin_l2_upload.info(f"重新创建L2订单上传线程:{code}") if code not in __upload_trans_threads or not __upload_trans_threads[code].is_alive(): t = threading.Thread(target=lambda: __run_upload_trans(code, _l2_data_callback), daemon=True) t.start() __upload_trans_threads[code] = t logger_local_huaxin_l2_upload.info(f"重新创建L2成交上传线程:{code}") time.sleep(3) except: pass trade/huaxin/huaxin_trade_api.py
@@ -53,7 +53,7 @@ # 记录交易反馈日志 hx_logger_trade_callback.info(data_json) # 重新请求委托列表与资金 huaxin_trade_data_update.add_delegate_list() huaxin_trade_data_update.add_delegate_list("来自交易管道") huaxin_trade_data_update.add_deal_list() huaxin_trade_data_update.add_money_list() # print("响应结果:", data_json['data']) @@ -341,7 +341,7 @@ try: return __read_response(request_id, blocking) finally: huaxin_trade_data_update.add_delegate_list() huaxin_trade_data_update.add_delegate_list("下单") huaxin_trade_data_update.add_money_list() else: return {"local_order_id": local_order_id} @@ -360,7 +360,7 @@ try: return __read_response(request_id, blocking) finally: huaxin_trade_data_update.add_delegate_list() huaxin_trade_data_update.add_delegate_list("撤单") huaxin_trade_data_update.add_money_list() trade/huaxin/huaxin_trade_data_update.py
@@ -98,8 +98,9 @@ trade_data_request_queue.put_nowait(data) def add_delegate_list(): def add_delegate_list(source): __add_data({"type": "delegate_list"}) hx_logger_trade_debug.info(f"请求委托列表,来源:{source}") def add_deal_list(): trade/huaxin/trade_api_server.py
@@ -122,7 +122,7 @@ return_str = json.dumps({"code": 0}) finally: # 更新委托列表 huaxin_trade_data_update.add_delegate_list() huaxin_trade_data_update.add_delegate_list("接口") huaxin_trade_data_update.add_money_list() else: raise Exception(resultJSON['msg']) @@ -243,7 +243,7 @@ # 同步交易数据 sync_type = data_json["data"]["type"] if sync_type == "delegate_list": huaxin_trade_data_update.add_delegate_list() huaxin_trade_data_update.add_delegate_list("接口") elif sync_type == "deal_list": huaxin_trade_data_update.add_deal_list() elif sync_type == "money": trade/huaxin/trade_server.py
@@ -641,7 +641,7 @@ try: sync_type = data["ctype"] if sync_type == "delegate_list": huaxin_trade_data_update.add_delegate_list() huaxin_trade_data_update.add_delegate_list("API主动请求") elif sync_type == "deal_list": huaxin_trade_data_update.add_deal_list() elif sync_type == "money": @@ -782,7 +782,7 @@ # 记录交易反馈日志 hx_logger_trade_callback.info(data_json) # 重新请求委托列表与资金 huaxin_trade_data_update.add_delegate_list() huaxin_trade_data_update.add_delegate_list("交易回调") huaxin_trade_data_update.add_deal_list() huaxin_trade_data_update.add_money_list()