** EDIT Script Now Working For CK Pool & CK Solo Pool.**
I created a Pool / Miner / Network info checker for CK pool
It's coded in python very simple to use just drop your own worker address into line 25 and line 158 ( line 25 for solo pool worker URL, Line 158 for wallet balance checking)
it updates every 160 seconds and prints out the latest stats from Miner / Pool and grabs some stats from blockchain for fun and also checked the wallet address to see for new transactions.
Workflow of the script.
`1. Get Pool Status
2. Get Miner Status
3. Get Latest Block Hash
4. Get Current Network Hashrate
5. Get Blocks Per Pool 1 day ( Can change to max last 10 days )
6. Get Estimated Time Until Next Block (Seconds)
7. Get Block Count
8. Get Number Of Unconfirmed Transactions
9. Get Probability Of Finding A Valid Block Per Each Hash Attempt
10. Get Average Number Of Hashes Needed To Solve A Block
11. Get Additional Blockchain Data (BlockCypher)
12. Get Bitcoin Spot Prices (CoinBase)
13. Check Wallet For JACKPOT
14. Shameless advert while waiting
Wait 160+ sec, clears terminal before next request.. Repeat.
# CKPool Python Miner & Pool Monitor
# Donations welcome : 3JjsGHYQH8yVJA5G4mgPNHuoX4DHmU5fis
# Will work for both solo and non-solo pools
# users change the bitcoin address in line 25 & line 158 to there own worker
# timeout is 160 sec between requests line 192
import urllib2
import json
import time
import os
## Welcome message
print " ___________________________________________\n"
print " ** Welcome To CKPool Multi-Monitor Tool **"
print " ** Fetching Pool Status **"
print " -------------------------------------------"
time.sleep(3)
print "\n"
print " ** http://solo.ckpool.org | No fuss 1% fee anonymous solo bitcoin mining for everyone **"
print " ** http://ckpool.org | No frills, no ZERO FEE anonymous SPLNS bitcoin mining for everyone **"
print "\n"
print "\n"
time.sleep(3)
print " ** Fetching Pool Status **"
print "\n"
time.sleep(1)
## Check Pool Status Start while True > continue > (loop)
while True:
req = urllib2.Request("http://ckpool.org/pool/pool.status")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print json
print "\n"
time.sleep(5)
print " ** Fetching Miner Status **"
time.sleep(2)
## Check Miner Status Page
req = urllib2.Request("http://ckpool.org/users/YOURADDRESSHERE")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print json
time.sleep(7)
print "\n"
## Break section
print " *** Fetching Network Data *** \n"
time.sleep(4)
## Get Latest Block Hash
req = urllib2.Request("https://blockchain.info/q/latesthash")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Lastest Block Hash \n" + json
print "\n"
time.sleep(3)
## Get Network Hashrate
req = urllib2.Request("https://blockchain.info/q/hashrate")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Current Network Hashrate \n" + json
print "\n"
time.sleep(3)
## Get Diff
req = urllib2.Request("https://blockchain.info/q/getdifficulty")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Current Network Difficulty \n" + json
print "\n"
time.sleep(3)
## Get 1 Day Block Stats
req = urllib2.Request("https://api.blockchain.info/pools?timespan=1days")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Blocks Stats Per Pool 1 Days \n" + json
print "\n"
time.sleep(5)
## Get Estimated Time Until The Next Block (in seconds)
req = urllib2.Request("https://blockchain.info/q/eta")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Estimated Time Untill The Next Block (in seconds) \n"
print json + " Seconds"
print "\n"
time.sleep(3)
## Get Block Height
req = urllib2.Request("https://blockchain.info/q/getblockcount")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Block Count \n"
print json + " Blocks"
print "\n"
time.sleep(3)
## Get Unconfirmed Transaction Count
req = urllib2.Request("https://blockchain.info/q/unconfirmedcount")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Number Of Unconfirmed Transactions In Mempool"
print json + " Transactions"
print "\n"
time.sleep(2)
print "\n"
print " ** Fetching Probability Stats **"
time.sleep(2)
print "\n"
## Get Probability & Average Hashes Needed To Solve
req = urllib2.Request("https://blockchain.info/q/probability")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Probability Of Finding A Valid Block Each Hash Attempt \n"
print json + " %"
print "\n"
## Get average number of hashes per block
req = urllib2.Request("https://blockchain.info/q/hashestowin")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " Average Number Of Hash Attempts Needed To Solve A Block \n"
print json + " Hashes"
print "\n"
time.sleep(3)
## Get Additional Network Info
req = urllib2.Request("https://api.blockcypher.com/v1/btc/main")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " ** Fetching Additional Bitcoin Data **"
print " ** Loading **"
print "\n"
time.sleep(3)
print json
print "\n"
## Break For Price Data
print "\n"
print " ** $$$ Fetching Ticker Prices $$$ **"
time.sleep(5)
## Get Price Data (ticker)
req = urllib2.Request("https://blockchain.info/ticker")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " ** Bitcoin Spot Prices (Coinbase) **"
print json
print "\n"
time.sleep(5)
## Break to print
print " ** $$ Checking Wallet For New Transactions $$ **"
print " ** $$ !Fingers Crossed! $$ **"
time.sleep(4)
## Check wallet for winning transaction
req = urllib2.Request("https://blockchain.info/rawaddr/YOURADDRESSHERE?format=json")
opener = urllib2.build_opener()
f = opener.open(req)
json = (f.read())
print " ** $$ Your Wallet Status $$ **"
print json
print "\n"
time.sleep(2)
## Print & Wait Before Next Request
## Users can set there own sleep time on line 178 in seconds if they would like less often updates.
print "\n"
print " ** Mine @ CKPool **"
print " ** http://solo.ckpool.org | No fuss 1% fee anonymous solo bitcoin mining for everyone **"
print " ** http://ckpool.org | No frills, no ZERO FEE anonymous SPLNS bitcoin mining for everyone **"
print " ** Price Data From Coinbase API **"
print " ** Network Data From Blockchain API **"
print " ** Additional Data From BlockCypher API **"
print " ** Built By MagicByt3 **"
print " ** $$ Donations Welcome : 3JjsGHYQH8yVJA5G4mgPNHuoX4DHmU5fis $$ **"
print " ** Auto Refreshing in 160 Seconds **\n"
time.sleep(160)
os.system('clear')
continue
How to use : Save the above as Minercheck.py
Edit line 25 with your own address used on the pool.
Edit line 158 with your wallet address for transaction checking.
run with python Minercheck.py
when it's run it prints the output like such..
checkminer2.py
___________________________________________
** Welcome To CKPool Multi-Monitor Tool **
** Fetching Pool Status **
-------------------------------------------
** http://solo.ckpool.org | No fuss 1% fee anonymous solo bitcoin mining for everyone **
** http://ckpool.org | No frills, no ZERO FEE anonymous SPLNS bitcoin mining for everyone **
** Fetching Pool Status **
{"runtime": 28656767, "lastupdate": 1561653438, "Users": 182, "Workers": 571, "Idle": 136, "Disconnected": 393}
{"hashrate1m": "4.75P", "hashrate5m": "4.67P", "hashrate15m": "4.61P", "hashrate1hr": "4.56P", "hashrate6hr": "4.86P", "hashrate1d": "6.28P", "hashrate7d": "5.91P"}
{"SPS1m": 95.2, "SPS5m": 92.3, "SPS15m": 90.4, "SPS1h": 88.7}
{"diff": "209.5", "accepted": 16625046108523, "rejected": 214904191538, "lns": 36238429766705.0, "herp": 36238520187183.01, "reward": 14.54685296}
** Fetching Miner Status **
{
"hashrate1m": "0",
"hashrate5m": "0",
"hashrate1hr": "0",
"hashrate1d": "0",
"hashrate7d": "0",
"lastshare": 0,
"workers": 0,
"shares": 0,
"bestshare": 0.0,
"lns": 0.1,
"luck": 1.0,
"accumulated": 0.0,
"postponed": 0,
"herp": 0.1,
"derp": 0.0,
"worker": []
}
*** Fetching Network Data ***
Lastest Block Hash
0000000000000000000f0b4533b9300159350358d77d5fbe9fea29af2aba4a02
Current Network Hashrate
62715440639
Current Network Difficulty
7.93471321963E12
Blocks Stats Per Pool 1 Days
{"SlushPool":14,"Poolin":20,"Unknown":14,"BTC.com":30,"F2Pool":24,"ViaBTC":10,"AntPool":16,"BTC.TOP":17,"Bixin":2,"Bitcoin.com":2,"BitClub Network":4,"BitFury":5}
Estimated Time Untill The Next Block (in seconds)
-977.9367 Seconds
Block Count
582706 Blocks
Number Of Unconfirmed Transactions In Mempool
75418 Transactions
** Fetching Probability Stats **
Probability Of Finding A Valid Block Each Hash Attempt
0.00000000000000000000002934329662701113 %
Average Number Of Hash Attempts Needed To Solve A Block
9223372036854775807 Hashes
** Fetching Additional Bitcoin Data **
** Loading **
{
"name": "BTC.main",
"height": 582706,
"hash": "0000000000000000000f0b4533b9300159350358d77d5fbe9fea29af2aba4a02",
"time": "2019-06-27T16:11:27.009542616Z",
"latest_url": "https://api.blockcypher.com/v1/btc/main/blocks/0000000000000000000f0b4533b9300159350358d77d5fbe9fea29af2aba4a02",
"previous_hash": "00000000000000000022864c4ade7278a05cd6072ed8eeaebd21d3f97a0caa5a",
"previous_url": "https://api.blockcypher.com/v1/btc/main/blocks/00000000000000000022864c4ade7278a05cd6072ed8eeaebd21d3f97a0caa5a",
"peer_count": 1044,
"unconfirmed_count": 55903,
"high_fee_per_kb": 169148,
"medium_fee_per_kb": 25000,
"low_fee_per_kb": 15000,
"last_fork_height": 581841,
"last_fork_hash": "0000000000000000000f8f9b99a8ffc379af3c670713741de2e93b9e85542e12"
}
** $$$ Fetching Ticker Prices $$$ **
** Bitcoin Spot Prices (Coinbase) **
{
"USD" : {"15m" : 10971.69, "last" : 10971.69, "buy" : 10971.69, "sell" : 10971.69, "symbol" : "$"},
"AUD" : {"15m" : 15679.02, "last" : 15679.02, "buy" : 15679.02, "sell" : 15679.02, "symbol" : "$"},
"BRL" : {"15m" : 42357.0, "last" : 42357.0, "buy" : 42357.0, "sell" : 42357.0, "symbol" : "R$"},
"CAD" : {"15m" : 14389.72, "last" : 14389.72, "buy" : 14389.72, "sell" : 14389.72, "symbol" : "$"},
"CHF" : {"15m" : 10715.24, "last" : 10715.24, "buy" : 10715.24, "sell" : 10715.24, "symbol" : "CHF"},
"CLP" : {"15m" : 7463768.7, "last" : 7463768.7, "buy" : 7463768.7, "sell" : 7463768.7, "symbol" : "$"},
"CNY" : {"15m" : 75453.43, "last" : 75453.43, "buy" : 75453.43, "sell" : 75453.43, "symbol" : "¥"},
"DKK" : {"15m" : 72021.19, "last" : 72021.19, "buy" : 72021.19, "sell" : 72021.19, "symbol" : "kr"},
"EUR" : {"15m" : 9660.62, "last" : 9660.62, "buy" : 9660.62, "sell" : 9660.62, "symbol" : "€"},
"GBP" : {"15m" : 8657.32, "last" : 8657.32, "buy" : 8657.32, "sell" : 8657.32, "symbol" : "£"},
"HKD" : {"15m" : 85738.85, "last" : 85738.85, "buy" : 85738.85, "sell" : 85738.85, "symbol" : "$"},
"INR" : {"15m" : 757294.75, "last" : 757294.75, "buy" : 757294.75, "sell" : 757294.75, "symbol" : "₹"},
"ISK" : {"15m" : 1367228.22, "last" : 1367228.22, "buy" : 1367228.22, "sell" : 1367228.22, "symbol" : "kr"},
"JPY" : {"15m" : 1194356.76, "last" : 1194356.76, "buy" : 1194356.76, "sell" : 1194356.76, "symbol" : "¥"},
"KRW" : {"15m" : 1.269479781E7, "last" : 1.269479781E7, "buy" : 1.269479781E7, "sell" : 1.269479781E7, "symbol" : "₩"},
"NZD" : {"15m" : 16378.63, "last" : 16378.63, "buy" : 16378.63, "sell" : 16378.63, "symbol" : "$"},
"PLN" : {"15m" : 41039.66, "last" : 41039.66, "buy" : 41039.66, "sell" : 41039.66, "symbol" : "zł"},
"RUB" : {"15m" : 691896.93, "last" : 691896.93, "buy" : 691896.93, "sell" : 691896.93, "symbol" : "RUB"},
"SEK" : {"15m" : 101738.2, "last" : 101738.2, "buy" : 101738.2, "sell" : 101738.2, "symbol" : "kr"},
"SGD" : {"15m" : 14849.72, "last" : 14849.72, "buy" : 14849.72, "sell" : 14849.72, "symbol" : "$"},
"THB" : {"15m" : 337818.44, "last" : 337818.44, "buy" : 337818.44, "sell" : 337818.44, "symbol" : "฿"},
"TWD" : {"15m" : 340434.75, "last" : 340434.75, "buy" : 340434.75, "sell" : 340434.75, "symbol" : "NT$"}
}
** $$ Checking Wallet For New Transactions $$ **
** $$ !Fingers Crossed! $$ **
** $$ Your Wallet Status $$ **
{
"hash160":"bb0428539fcb8d8708f9acff951d24f48f5ab8c6",
"address":"3JjsGHYQH8yVJA5G4mgPNHuoX4DHmU5fis",
"n_tx":0,
"total_received":0,
"total_sent":0,
"final_balance":0,
"txs":[]
}
** Mine @ CKPool **
** http://solo.ckpool.org | No fuss 1% fee anonymous solo bitcoin mining for everyone **
** http://ckpool.org | No frills, no ZERO FEE anonymous SPLNS bitcoin mining for everyone **
** Price Data From Coinbase API **
** Network Data From Blockchain API **
** Additional Data From BlockCypher API **
** Built By MagicByt3 **
** $$ Donations Welcome : 3JjsGHYQH8yVJA5G4mgPNHuoX4DHmU5fis $$ **
** Auto Refreshing in 160 Seconds **
I'm sure someone will find this tool handy to keep eyes on things you could also set the last sleep function for longer intervals if required.
** Edit Updated script should look better now on a full screen **