Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from win10toast import ToastNotifier
import requests
from datetime import datetime
ticker_url="https://api.btcturk.com/api/v2/ticker"
toaster=ToastNotifier()
now=datetime.now()
formatted_time = now.strftime("%H:%M")
toast_title="Coin Fiyatları "+formatted_time
toast_body=""
response=requests.get(ticker_url)
if response.status_code==200:
data=response.json()["data"]
for currency in data:
name=currency["pair"]
last=currency["last"]
toast_body+=name+" "+str(last)+"\n"
toaster.show_toast(toast_title,
toast_body,
duration=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment