1
0
mirror of https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git synced 2025-07-25 15:41:33 +00:00

so many changes

This commit is contained in:
2021-02-27 17:14:55 -07:00
parent 6e37e541d6
commit e08f3c4275
5 changed files with 130 additions and 57 deletions

View File

@@ -119,7 +119,7 @@ class cg_Crypto:
"""
response = r.get(
f"https://api.coingecko.com/api/v3/coins/{symbol}?localization=false"
f"https://api.coingecko.com/api/v3/coins/{symbol.id}?localization=false"
)
if response.status_code == 200:
data = response.json()
@@ -189,6 +189,7 @@ class cg_Crypto:
response = r.get(
"https://api.coingecko.com/api/v3/coins/{symbol}/ohlc?vs_currency=usd&days=30"
)
print(response.status_code)
if response.status_code == 200:
df = pd.DataFrame(
response.json(), columns=["Date", "Open", "High", "Low", "Close"]