mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-16 15:17:28 +00:00
Broke Change% in recent update
This commit is contained in:
parent
75355309bc
commit
26ddc267ff
@ -174,6 +174,10 @@ class IEX_Symbol:
|
|||||||
or (IEXData["extendedPrice"] is None)
|
or (IEXData["extendedPrice"] is None)
|
||||||
): # Check if market is open.
|
): # Check if market is open.
|
||||||
message = f"The current stock price of {IEXData['companyName']} is $**{IEXData['latestPrice']}**"
|
message = f"The current stock price of {IEXData['companyName']} is $**{IEXData['latestPrice']}**"
|
||||||
|
if change := IEXData.get("changePercent", 0):
|
||||||
|
change = round(change * 100, 2)
|
||||||
|
else:
|
||||||
|
change = 0
|
||||||
|
|
||||||
else:
|
else:
|
||||||
message = (
|
message = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user