I should check data more often.
This commit is contained in:
parent
c08d3c2daf
commit
363d0ba6d9
1 changed files with 6 additions and 6 deletions
|
@ -7,10 +7,10 @@ def bitcoin(inp, say=None):
|
|||
data = http.get_json("https://data.mtgox.com/api/2/BTCUSD/money/ticker")
|
||||
data = data['data']
|
||||
ticker = {
|
||||
'buy': data['buy']['display_short'],
|
||||
'high': data['high']['display_short'],
|
||||
'low': data['low']['display_short'],
|
||||
'vol': data['vol']['display_short'],
|
||||
'buy': data['buy']['display_short'].encode('ascii','ignore'),
|
||||
'high': data['high']['display_short'].encode('ascii','ignore'),
|
||||
'low': data['low']['display_short'].encode('ascii','ignore'),
|
||||
'vol': data['vol']['display_short'].encode('ascii','ignore'),
|
||||
}
|
||||
say("Current: \x0307{}\x0f - High: \x0307{}\x0f"
|
||||
" - Low: \x0307{}\x0f - Volume: {}".format(data['buy'],data['high'],data['low'],data['vol']))
|
||||
say("Current: \x0307{!s}\x0f - High: \x0307{!s}\x0f"
|
||||
" - Low: \x0307{!s}\x0f - Volume: {!s}".format(ticker['buy'],ticker['high'],ticker['low'],ticker['vol']))
|
||||
|
|
Reference in a new issue