1
0
mirror of https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git synced 2025-06-16 15:06:53 +00:00

fix for symbols without a dividend

This commit is contained in:
Anson Biggs 2021-02-25 11:21:59 -07:00
parent 96321d7c07
commit 487ab10933

View File

@ -234,7 +234,7 @@ class IEX_Symbol:
IEXurl = f"https://cloud.iexapis.com/stable/stock/{symbol}/dividends/next?token={self.IEX_TOKEN}" IEXurl = f"https://cloud.iexapis.com/stable/stock/{symbol}/dividends/next?token={self.IEX_TOKEN}"
response = r.get(IEXurl) response = r.get(IEXurl)
if response.status_code == 200: if response.status_code == 200 and response.json():
IEXData = response.json()[0] IEXData = response.json()[0]
keys = ( keys = (
"amount", "amount",