From 6fb540dfb5912fc92dd9c4666c712fd2af02561b Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 25 六月 2024 11:09:59 +0800 Subject: [PATCH] 已挂单的数据不能移除L2 --- code_attribute/code_volumn_manager.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py index 3c046c8..5aa094f 100644 --- a/code_attribute/code_volumn_manager.py +++ b/code_attribute/code_volumn_manager.py @@ -91,6 +91,8 @@ 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: + today = 0 if today is None or max60 is None or yesterday is None: raise Exception(f"鑾峰彇閲忓け璐�:{code}") rate = round((int(today) + total_sell_volume) / max(int(max60[0]), int(yesterday)), 2) -- Gitblit v1.8.0