commacommacommacommacommacommacomma
This commit is contained in:
parent
d78f96b3ec
commit
2d5208cbde
|
@ -14,11 +14,11 @@ def bitcoin(inp):
|
|||
},
|
||||
"bitpay": {
|
||||
"api_url": "https://bitpay.com/api/rates",
|
||||
"func": lambda data: u"Bitpay // Current: \x0307${:.2f}\x0f".format(data[0]['rate'])
|
||||
"func": lambda data: u"Bitpay // Current: \x0307${:,.2f}\x0f".format(data[0]['rate'])
|
||||
},
|
||||
"bitstamp": {
|
||||
"api_url": "https://www.bitstamp.net/api/ticker/",
|
||||
"func": lambda data: u"BitStamp // Current: \x0307${}\x0f - High: \x0307${}\x0f - Low: \x0307${}\x0f - Volume: {:.2f} BTC".format(data['last'], data['high'], data['low'], \
|
||||
"func": lambda data: u"BitStamp // Current: \x0307${:,.2f}\x0f - High: \x0307${:,.2f}\x0f - Low: \x0307${:,.2f}\x0f - Volume: {:,.2f} BTC".format(float(data['last']), float(data['high']), float(data['low']), \
|
||||
float(data['volume']))
|
||||
}
|
||||
}
|
||||
|
@ -43,5 +43,5 @@ def litecoin(inp, message=None):
|
|||
"""litecoin -- gets current exchange rate for litecoins from BTC-E"""
|
||||
data = http.get_json("https://btc-e.com/api/2/ltc_usd/ticker")
|
||||
ticker = data['ticker']
|
||||
message("Current: \x0307${:.2f}\x0f - High: \x0307${:.2f}\x0f"
|
||||
" - Low: \x0307${:.2f}\x0f - Volume: {:.2f}LTC".format(ticker['buy'], ticker['high'], ticker['low'], ticker['vol_cur']))
|
||||
message("Current: \x0307${:,.2f}\x0f - High: \x0307${:,.2f}\x0f"
|
||||
" - Low: \x0307${:,.2f}\x0f - Volume: {:,.2f} LTC".format(ticker['buy'], ticker['high'], ticker['low'], ticker['vol_cur']))
|
||||
|
|
Reference in New Issue