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

Fixed Inline #55

This commit is contained in:
2021-03-30 11:36:52 -07:00
parent 8dd3ef772f
commit 144dd1d218
4 changed files with 75 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
import functools
import requests as r
@@ -35,6 +36,7 @@ coins = r.get("https://api.coingecko.com/api/v3/coins/list").json()
class Coin(Symbol):
@functools.cache
def __init__(self, symbol: str) -> None:
self.symbol = symbol
self.get_data()
@@ -48,4 +50,4 @@ class Coin(Symbol):
self.name = data["name"]
self.description = data["description"]
self.price = data["market_data"]["current_price"][self.currency]
# self.price = data["market_data"]["current_price"][self.currency]