From 0a2df35c94e2624b88a18e10f544509e456ec8d5 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 21 五月 2024 11:23:54 +0800
Subject: [PATCH] bug修复

---
 main.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/main.py b/main.py
index 283cd6f..0311ed3 100644
--- a/main.py
+++ b/main.py
@@ -148,7 +148,7 @@
 
 def test():
     time.sleep(5)
-    print("鑾峰彇鎸佷粨锛�", huaxin_trade_api.get_position_list())
+    print("鑾峰彇鎸佷粨锛�", huaxin_trade_data_update.add_position_list())
     # print("鑾峰彇璧勯噾锛�", huaxin_trade_api.get_money())
     # print("鑾峰彇鎴愪氦锛�", huaxin_trade_api.get_deal_list())
     # print("涓嬪崟锛�", huaxin_trade_api.order(1, "127075", 10, 140.5, blocking=True))
@@ -169,7 +169,8 @@
                 if limit_up_price:
                     async_log_util.info(logger_trade, f"鍑嗗涓嬪崟锛歿cb_code}-{limit_up_price}")
                     # 涔板叆20鑲�
-                    huaxin_trade_api.order(1, cb_code, 20, round(float(limit_up_price), 3), blocking=False)
+                    result = huaxin_trade_api.order(1, cb_code, 20, round(float(limit_up_price), 3), blocking=True)
+                    async_log_util.info(logger_trade, f"鍙浆鍊轰笅鍗曠粨鏋滐細{result}")
         except Exception as e:
             logger_debug.exception(e)
             time.sleep(1)
@@ -207,7 +208,7 @@
                  command_callback, [("trade_cb", 20)])
     manager.run(blocking=False)
 
-    # threading.Thread(target=test, daemon=True).start()
+    threading.Thread(target=test, daemon=True).start()
     # ===========璇诲彇鏍规嵁L2鍒跺畾鐨勪拱鍏ョ瓥鐣�==========
     threading.Thread(target=read_l2_results, args=(trade_call_back_queue,), daemon=True).start()
     # ===========寮傛鏃ュ織鎸佷箙鍖�==========

--
Gitblit v1.8.0