mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-16 15:17:28 +00:00
Change % is now only 2 decimal places
This commit is contained in:
parent
f3ad59982d
commit
b340937a82
@ -17,7 +17,9 @@ def tickerQuote(tickers):
|
|||||||
ticker = ticker.upper()
|
ticker = ticker.upper()
|
||||||
stockData[ticker + "Name"] = IEXData[ticker]["quote"]["companyName"]
|
stockData[ticker + "Name"] = IEXData[ticker]["quote"]["companyName"]
|
||||||
stockData[ticker + "Price"] = IEXData[ticker]["quote"]["latestPrice"]
|
stockData[ticker + "Price"] = IEXData[ticker]["quote"]["latestPrice"]
|
||||||
stockData[ticker + "Change"] = IEXData[ticker]["quote"]["changePercent"] * 100
|
stockData[ticker + "Change"] = round(
|
||||||
|
(IEXData[ticker]["quote"]["changePercent"] * 100), 2
|
||||||
|
)
|
||||||
stockData[ticker + "Image"] = stockLogo(ticker)
|
stockData[ticker + "Image"] = stockLogo(ticker)
|
||||||
print("Quote Gathered")
|
print("Quote Gathered")
|
||||||
return stockData
|
return stockData
|
||||||
|
Loading…
x
Reference in New Issue
Block a user