bitcoin: round high/low to integers

This commit is contained in:
Ryan Hitchman 2014-02-11 12:21:06 -08:00
parent 79fec9ee46
commit 61da8580d0
1 changed files with 2 additions and 2 deletions

View File

@ -5,5 +5,5 @@ from util import http, hook
def bitcoin(inp, say=None):
".bitcoin -- gets current exchange rate for bitcoins from BTC-e"
data = http.get_json("https://btc-e.com/api/2/btc_usd/ticker")
say("BTC/USD: \x0307{buy:.0f}\x0f - High: \x0307{high}\x0f"
" - Low: \x0307{low}\x0f - Volume: {vol_cur:.0f}".format(**data['ticker']))
say("USD/BTC: \x0307{buy:.0f}\x0f - High: \x0307{high:.0f}\x0f"
" - Low: \x0307{low:.0f}\x0f - Volume: {vol_cur:.0f}".format(**data['ticker']))