Currently working on a GUI using tkinter. I want to implement a pretty standard request on the coingecko API to fetch the current price of Ethereum. This works fine so far. But I want this request to happen every 60 seconds to have the most recent price displayed in the GUI at all time.
import requests
import json
def get_eth():
eth = requests.get("https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=eur").text
eth = json.loads(eth)
return(eth["ethereum"]["eur"],"€")