Fix bithumb and fork date

This commit is contained in:
root 2017-09-08 02:46:53 +00:00
parent 5e1a7c854e
commit bca1fdbc2d
2 changed files with 7 additions and 7 deletions

View File

@ -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 -_-")

View File

@ -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