From 0deaa8930569222d8f4787d97a70a0a89496b44a Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期日, 26 十一月 2023 14:29:52 +0800
Subject: [PATCH] 卖提交之后2s内没有成交的需要撤单

---
 code_attribute/code_volumn_manager.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py
index a30bf54..3f578b1 100644
--- a/code_attribute/code_volumn_manager.py
+++ b/code_attribute/code_volumn_manager.py
@@ -85,12 +85,13 @@
 
 
 # 鑾峰彇閲忔瘮锛堜粖鏃ラ噺/max(60澶╂渶澶ч噺,鏄ㄦ棩閲�)锛�
-def get_volume_rate(code, with_info=False):
+# 灏嗘�诲崠閲忚绠楀湪鍐�
+def get_volume_rate(code, total_sell_volume=0, with_info=False):
     today = get_today_volumn(code)
     max60, yesterday = get_histry_volumn(code)
     if today is None or max60 is None or yesterday is None:
         raise Exception("鑾峰彇閲忓け璐�")
-    rate = round(int(today) / max(int(max60[0]), int(yesterday)), 2)
+    rate = round((int(today) + total_sell_volume) / max(int(max60[0]), int(yesterday)), 2)
     if not with_info:
         return rate
     return rate, (today, max(int(max60[0]), int(yesterday)))

--
Gitblit v1.8.0