Fix bithumb and fork date
This commit is contained in:
parent
5e1a7c854e
commit
bca1fdbc2d
|
@ -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 -_-")
|
||||
|
|
12
price.py
12
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue