Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import os
- import threading
- from kucoin.client import Client
- ########### Credentials #################
- api_key = ""
- api_secret = ""
- client = Client(api_key, api_secret)
- #########################################
- ########### Currency Update Function #############
- #Timer Setup
- def printit():
- threading.Timer(1.0, printit).start()
- pull = client.get_tick()
- coinType = pull[1]['coinType'] #Gets Coin Type(Name)
- buyPrice = pull[1]['buy'] #Gets Buy Price
- sellPrice = pull[1]['sell'] #Sell Price
- changerate = pull[1]['changeRate'] #Change Rate
- change = pull[1]['change'] #Change Price
- high = pull[1]['high'] #Change Daily High
- low = pull[1]['low'] #Change Daily Low
- os.system('cls')
- print('Coin: {0}'.format(coinType))
- print('Bitcoin BUYPRICE: ${0}'.format(buyPrice))
- print('Bitcoin SELLPRICE: ${0}'.format(sellPrice))
- print('Changerate: ${0}'.format(changerate))
- print('Daily Change: ${0}'.format(change))
- print('High: ${0}'.format(high))
- print('Low: ${0}'.format(low))
- printit()
- #########################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement