Skip to content

Instantly share code, notes, and snippets.

@2mac
Last active May 25, 2016 17:21
Show Gist options
  • Save 2mac/ce7d80a9777e04210f1848eb9cf07696 to your computer and use it in GitHub Desktop.
Save 2mac/ce7d80a9777e04210f1848eb9cf07696 to your computer and use it in GitHub Desktop.
from cfetch import get_ticker, load_default_plugins
from time import sleep
FORMAT = '.8f'
load_default_plugins()
btce = get_ticker('btce')
ccc = get_ticker('ccc')
while True:
btc = format(btce.get_rate('btc', 'usd'), FORMAT)
ltc = format(btce.get_rate('ltc', 'usd'), FORMAT)
doge = format(ccc.get_rate('doge', 'usd'), FORMAT)
print('BTC:', btc, 'LTC:', ltc, 'DOGE:', doge, end='\r')
sleep(20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment