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

update for OTC

This commit is contained in:
Anson Biggs 2021-03-31 00:59:40 +00:00
parent a4948fd566
commit 3e4945cffd

View File

@ -157,7 +157,6 @@ class IEX_Symbol:
if response.status_code == 200:
IEXData = response.json()
keys = (
"isUSMarketOpen",
"extendedChangePercent",
"extendedPrice",
"companyName",
@ -167,13 +166,10 @@ class IEX_Symbol:
if set(keys).issubset(IEXData):
try: # Some symbols dont return if the market is open
IEXData["isUSMarketOpen"]
except KeyError:
IEXData["isUSMarketOpen"] = True
if (
IEXData["isUSMarketOpen"]
IEXData.get("isUSMarketOpen", True)
or (IEXData["extendedChangePercent"] is None)
or (IEXData["extendedPrice"] is None)
): # Check if market is open.