From 46a1eacf98aa129150cef99568bdcdcddc32a0b7 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 24 五月 2024 13:18:40 +0800 Subject: [PATCH] bug修复 --- main.py | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/main.py b/main.py index ba00292..d340d4d 100644 --- a/main.py +++ b/main.py @@ -97,6 +97,11 @@ send_response({"code": 0, "data": {"orderRef": order_ref}}, client_id, request_id) else: raise e + finally: + huaxin_trade_data_update.add_position_list() + huaxin_trade_data_update.add_money_list() + huaxin_trade_data_update.add_deal_list() + else: if not price: limit_down_price = target_codes_manager.get_limit_down_price(code) @@ -116,6 +121,9 @@ result = huaxin_trade_api.order(direction, code, volume, price, sinfo=sinfo, blocking=True, request_id=request_id) + huaxin_trade_data_update.add_position_list() + huaxin_trade_data_update.add_money_list() + huaxin_trade_data_update.add_deal_list() send_response({"code": 0, "data": result}, client_id, request_id) except Exception as e: logger_debug.exception(e) @@ -203,6 +211,9 @@ result = huaxin_trade_api.order(1, cb_code, 20, round(float(limit_up_price), 3), blocking=True) __deal_codes.add(code) async_log_util.info(logger_trade, f"鍙浆鍊轰笅鍗曠粨鏋滐細{result}") + huaxin_trade_data_update.add_position_list() + huaxin_trade_data_update.add_money_list() + huaxin_trade_data_update.add_deal_list() except Exception as e: logger_debug.exception(e) time.sleep(1) -- Gitblit v1.8.0