ソースを参照

Don't send message when the dop is tiny in comparison with shares available

Foppe Hemminga 6 年 前
コミット
161e657b74
1 ファイル変更2 行追加1 行削除
  1. 2 1
      main.py

+ 2 - 1
main.py

@@ -30,10 +30,11 @@ def process_drop(this_stock):
     stock_name = this_stock[0]
     npc_drop = False
     total_stocks = data_latest.total_shares
+    previous_available_shares = data_previous.available_shares
     if model.is_npc_drop(data_previous, data_latest):
         npc_drop = True
     message = view.create_message(
-        stock_name, timestamp_latest, current_price, quantity, current_quantity=total_stocks, npc_drop=npc_drop)
+        stock_name, timestamp_latest, current_price, quantity, current_quantity=previous_available_shares, npc_drop=npc_drop)
     print(message)
     if is_drop:
         view.broadcast(message)