Browse Source

Merge pull request #3 from r3cursive/patch-1

Update StockIndex.py
master
Dave Pedu 5 months ago
committed by GitHub
parent
commit
13ea0fe52f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      pyircbot/modules/StockIndex.py

7
pyircbot/modules/StockIndex.py

@ -58,7 +58,12 @@ class StockIndex(ModuleBase):
@command("nasdaq", allow_private=True)
def cmd_nasdaq(self, message, command):
self.send_quote("^IXIC", "NASDAQ", message.replyto)
@info("vix", "get the current value of the vix/fear index", cmds=["vix"])
@command("vix", allow_private=True)
def cmd_vix(self, message, command):
self.send_quote("^VIX", "VIX", message.replyto)
def send_quote(self, key, symbol, to):
index = self.cache[key]
is_gain = index["price"] >= index["previousClose"]

Loading…
Cancel
Save