rouunndddinng
This commit is contained in:
parent
9c94cb01f9
commit
13c7e5915b
1 changed files with 4 additions and 3 deletions
|
@ -15,10 +15,11 @@ def bitcoin(inp, message=None):
|
||||||
message("Current: \x0307{!s}\x0f - High: \x0307{!s}\x0f"
|
message("Current: \x0307{!s}\x0f - High: \x0307{!s}\x0f"
|
||||||
" - Low: \x0307{!s}\x0f - Volume: {!s}".format(ticker['buy'], ticker['high'], ticker['low'], ticker['vol']))
|
" - Low: \x0307{!s}\x0f - Volume: {!s}".format(ticker['buy'], ticker['high'], ticker['low'], ticker['vol']))
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def litecoin(inp, message=None):
|
def litecoin(inp, message=None):
|
||||||
"""litecoin -- gets current exchange rate for litecoins from BTC-E"""
|
"""litecoin -- gets current exchange rate for litecoins from BTC-E"""
|
||||||
data = http.get_json("https://btc-e.com/api/2/ltc_usd/ticker")
|
data = http.get_json("https://btc-e.com/api/2/ltc_usd/ticker")
|
||||||
ticker = data['ticker']
|
ticker = data['ticker']
|
||||||
message("Current: \x0307${!s}\x0f - High: \x0307${!s}\x0f"
|
message("Current: \x0307${:.2f}\x0f - High: \x0307${:.2f}\x0f"
|
||||||
" - Low: \x0307${!s}\x0f - Volume: {!s}LTC".format(ticker['buy'],ticker['high'],ticker['low'],ticker['vol_cur']))
|
" - Low: \x0307${:.2f}\x0f - Volume: {:.2f}LTC".format(ticker['buy'], ticker['high'], ticker['low'], ticker['vol_cur']))
|
||||||
|
|
Reference in a new issue