diff --git a/network.py b/network.py index 65f875e..4d5d57c 100644 --- a/network.py +++ b/network.py @@ -13,7 +13,7 @@ def fork(bot, trigger): pass try: height=j["network"]["height"] - forkheight=1288616 + forkheight=1400000 bot.say("The current block height is {0:,}. Fork height is {1:,}. {2:,} blocks to go, happening in approximately {3:.2f} hours.".format(height,forkheight,forkheight-height,(forkheight-height)/30.0)) except: bot.say("Something borked -_-") diff --git a/price.py b/price.py index 4b2e4bc..f3d1fe9 100644 --- a/price.py +++ b/price.py @@ -523,17 +523,17 @@ def xmrtall(bot, trigger): xmrjson = xmr_r.json() btcjson = btc_r.json() # No last price in api. Must average buy and sell price. - thumbXMRbuy = xmrjson['data']['buy_price'] - thumbXMRsell = xmrjson['data']['sell_price'] + thumbXMRbuy = float(xmrjson['data']['buy_price']) + thumbXMRsell = float(xmrjson['data']['sell_price']) thumbXMRkrw = (thumbXMRbuy + thumbXMRsell)/2 # Same for BTC - thumbBTCbuy = btcjson['data']['buy_price'] - thumbBTCsell = btcjson['data']['sell_price'] + thumbBTCbuy = float(btcjson['data']['buy_price']) + thumbBTCsell = float(btcjson['data']['sell_price']) thumbBTCkrw = (thumbBTCbuy + thumbBTCsell)/2 # Finally, price in BTC, and volume in XMR thumbBTCxmr = thumbXMRkrw/thumbBTCkrw - thumbXMRVol = xmrjson['data']['volume_1day'] - stringtosend = "Bithumb last: {0:.6f} BTC* on {1:.2f} XMR volume |".format(thumbBTCxmr,thumbXMRVol) + thumbXMRVol = float(xmrjson['data']['volume_1day']) + stringtosend = "Bithumb last: {0:.6f} BTC on {1:.2f} XMR volume |".format(thumbBTCxmr,thumbXMRVol) except: pass