mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-15 23:06:40 +00:00
update for OTC
This commit is contained in:
parent
a4948fd566
commit
3e4945cffd
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user