Post
Topic
Board Mining (Altcoins)
Re: Will Bitcoin Cash be more profitable for mining?
by
Enkeci
on 17/08/2017, 20:40:29 UTC
any BCC mining calculators out yet?  Has the difficulty fully retargeted to the new hashrate?  Wondering if it's worth firing up my S5 or not.  Power cost is not an issue.
Maybe that works

An online calculator here http://cashcalculator.pw/

Code:
#!/usr/bin/python

import urllib2,simplejson,sys

# usage python cashmine.py
# example to calculate bitcoin cash earning for 14 ths, python cashmine.py 14
 

def calc():
    
    usd = simplejson.load(urllib2.urlopen("https://api.coinmarketcap.com/v1/ticker/bitcoin-cash/"))[0]["price_usd"]
    month_bcc = (30* int(sys.argv[1]) * 1e12 * 12.5 * 86400) / (simplejson.load(urllib2.urlopen("https://cashexplorer.bitcoin.com/api/status?q=getDifficulty"))["difficulty"]*2**32)

    print "[*]Bitcoin Cash mining calculator using %s ths" %sys.argv[1]
    print "[*]Difficulty changes every 2016 blocks, 2 weeks"
    print
    print "Hour:  %f bcc  ||->  %.2f usd" %(month_bcc / 30 / 24, float(usd) * month_bcc / 30 / 24)
    print "Day:   %f bcc  ||->  %.2f usd" %(month_bcc / 30 , float(usd) * month_bcc / 30 )
    print "Week:  %f bcc  ||->  %.2f usd" %(month_bcc / 30 * 7, float(usd) * month_bcc / 30 * 7)
    print "Month: %f bcc  ||->  %.2f usd" %(month_bcc, float(usd) * month_bcc)
    

if __name__ == '__main__':
    calc()