*puffs*
This commit is contained in:
parent
d3fbf1bc80
commit
834cbaabd8
|
@ -1,10 +1,11 @@
|
|||
from util import http, hook
|
||||
|
||||
|
||||
@hook.command("butt", autohelp=False)
|
||||
@hook.command("btc", autohelp=False)
|
||||
@hook.command(autohelp=False)
|
||||
def bitcoin(inp):
|
||||
"bitcoin <exchange> -- Gets current exchange rate for bitcoins from several exchanges, default is MtGox. Supports MtGox, Bitpay, and BitStamp."
|
||||
"bitcoin <exchange> -- Gets current exchange rate for bitcoins from several exchanges, default is Blockchain. Supports MtGox, Bitpay, Coinbase and BitStamp."
|
||||
exchanges = {
|
||||
"blockchain": {
|
||||
"api_url": "https://blockchain.info/ticker",
|
||||
|
@ -17,6 +18,10 @@ def bitcoin(inp):
|
|||
data['return']['high']['display'], data['return']['low']['display'], data['return']['buy']['display'], \
|
||||
data['return']['vol']['display'])
|
||||
},
|
||||
"coinbase":{
|
||||
"api_url": "https://coinbase.com/api/v1/prices/spot_rate",
|
||||
"func": lambda data: u"Coinbase // Current: \x0307${:,.2f}\x0f".format(float(data['amount']))
|
||||
},
|
||||
"bitpay": {
|
||||
"api_url": "https://bitpay.com/api/rates",
|
||||
"func": lambda data: u"Bitpay // Current: \x0307${:,.2f}\x0f".format(data[0]['rate'])
|
||||
|
|
Reference in New Issue