Created
May 17, 2020 14:09
-
-
Save anilkay/6c063d6d3b4c99ffaf33dc48fc50943a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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