Compare commits

...

3 Commits

Author SHA1 Message Date
Dave Pedu 13ea0fe52f
Merge pull request #3 from r3cursive/patch-1
Update StockIndex.py
2021-03-04 13:12:12 -08:00
Kirk fb6a5766c7
Update StockIndex.py
idk if indexes have to be capitalize
2021-03-04 13:03:59 -08:00
Kirk 0db7e23383
Update StockIndex.py
yolo added vix idk if it works papa
2021-03-04 13:03:03 -08:00
1 changed files with 6 additions and 1 deletions

View File

@ -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"]