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

Change % is now only 2 decimal places

This commit is contained in:
Anson 2019-02-04 09:18:36 -07:00
parent f3ad59982d
commit b340937a82

View File

@ -17,7 +17,9 @@ def tickerQuote(tickers):
ticker = ticker.upper()
stockData[ticker + "Name"] = IEXData[ticker]["quote"]["companyName"]
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)
print("Quote Gathered")
return stockData