*puffs*
This commit is contained in:
parent
d3fbf1bc80
commit
834cbaabd8
1 changed files with 6 additions and 1 deletions
|
@ -1,10 +1,11 @@
|
||||||
from util import http, hook
|
from util import http, hook
|
||||||
|
|
||||||
|
|
||||||
|
@hook.command("butt", autohelp=False)
|
||||||
@hook.command("btc", autohelp=False)
|
@hook.command("btc", autohelp=False)
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def bitcoin(inp):
|
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 = {
|
exchanges = {
|
||||||
"blockchain": {
|
"blockchain": {
|
||||||
"api_url": "https://blockchain.info/ticker",
|
"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']['high']['display'], data['return']['low']['display'], data['return']['buy']['display'], \
|
||||||
data['return']['vol']['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": {
|
"bitpay": {
|
||||||
"api_url": "https://bitpay.com/api/rates",
|
"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'])
|
||||||
|
|
Reference in a new issue