From 2727748dff6ddc068fe94c820eb79ef5a051605c Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 11 六月 2024 23:50:27 +0800
Subject: [PATCH] 兼容30代码卖出

---
 utils/tool.py |   37 +++++++++++++++++++++++++++++++++++--
 1 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/utils/tool.py b/utils/tool.py
index 6e4819e..89ac66f 100644
--- a/utils/tool.py
+++ b/utils/tool.py
@@ -304,11 +304,26 @@
 
 
 # 鏄惁涓轰富鏉夸唬鐮�
-def is_shsz_code(code):
-    if code.find("00") == 0 or code.find("60") == 0:
+def is_can_sell_code(code):
+    if code.find("00") == 0 or code.find("60") == 0 or code.find("30") == 0:
         return True
     return False
 
+
+def get_limit_up_rate(code):
+    # 鑾峰彇娑ㄥ仠鍊嶆暟
+    if code.find("00") == 0 or code.find("60") == 0:
+        return 1.1
+    else:
+        return 1.2
+
+
+def get_limit_down_rate(code):
+    # 鑾峰彇娑ㄥ仠鍊嶆暟
+    if code.find("00") == 0 or code.find("60") == 0:
+        return 0.9
+    else:
+        return 0.8
 
 def get_thread_id():
     try:
@@ -344,5 +359,23 @@
         return MARKET_TYPE_UNKNOWN
 
 
+def is_sh_code(code):
+    """
+    鏄惁鏄笂璇�
+    @param code:
+    @return:
+    """
+    return get_market_type(code) == MARKET_TYPE_SSE
+
+
+def is_sz_code(code):
+    """
+    鏄惁鏄繁璇�
+    @param code:
+    @return:
+    """
+    return get_market_type(code) == MARKET_TYPE_SZSE
+
+
 if __name__ == "__main__":
     pass

--
Gitblit v1.8.0