mirror of
https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git
synced 2025-08-02 03:21:26 +00:00
bug where symbol had no dividend
This commit is contained in:
@@ -282,7 +282,7 @@ _Donations can only be made in a chat directly with @simplestockbot_
|
|||||||
|
|
||||||
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",
|
||||||
|
Reference in New Issue
Block a user