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.
Work flow
`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, auto clear terminal before next request.. Repeat.
API's used :
Blockchain API
BlockCypher API
Coinbase API
# 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://solo.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://solo.ckpool.org/users/3JjsGHYQH8yVJA5G4mgPNHuoX4DHmU5fis")
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/3JjsGHYQH8yVJA5G4mgPNHuoX4DHmU5fis?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 Blockchain 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": 32184275, "lastupdate": 1561652901, "Users": 777, "Workers": 1672, "Idle": 295, "Disconnected": 63}
{"hashrate1m": "2.03P", "hashrate5m": "2.05P", "hashrate15m": "2.07P", "hashrate1hr": "2.11P", "hashrate6hr": "2.87P", "hashrate1d": "2.96P", "hashrate7d": "2.85P"}
{"diff": 121.0, "accepted": 9602448609370, "rejected": 64960673266, "bestshare": 4428906512263, "SPS1m": 166.0, "SPS5m": 141.0, "SPS15m": 131.0, "SPS1h": 128.0}
** Fetching Miner Status **
{
"hashrate1m": "440G",
"hashrate5m": "433G",
"hashrate1hr": "415G",
"hashrate1d": "407G",
"hashrate7d": "185G",
"lastshare": 1561652899,
"workers": 1,
"shares": 38997850,
"bestshare": 58202808.11373531,
"bestever": 58202808,
"worker": [
{
"workername": "3JjsGHYQH8yVJA5G4mgPNHuoX4DHmU5fis.Lucky888",
"hashrate1m": "440G",
"hashrate5m": "433G",
"hashrate1hr": "415G",
"hashrate1d": "407G",
"hashrate7d": "185G",
"lastshare": 1561652899,
"shares": 38997850,
"bestshare": 58202808.11373531,
"bestever": 58202808
}
]
}
*** Fetching Network Data ***
Lastest Block Hash
0000000000000000000f0b4533b9300159350358d77d5fbe9fea29af2aba4a02
Current Network Hashrate
63109877373
Current Network Difficulty
7.93471321963E12
Blocks Stats Per Pool 1 Days
{"F2Pool":25,"Unknown":15,"SlushPool":14,"Poolin":20,"BTC.com":30,"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)
-511.8931 Seconds
Block Count
582706 Blocks
Number Of Unconfirmed Transactions In Mempool
72893 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.009907796Z",
"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": 1045,
"unconfirmed_count": 53554,
"high_fee_per_kb": 166751,
"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" : 10928.51, "last" : 10928.51, "buy" : 10928.51, "sell" : 10928.51, "symbol" : "$"},
"AUD" : {"15m" : 15617.31, "last" : 15617.31, "buy" : 15617.31, "sell" : 15617.31, "symbol" : "$"},
"BRL" : {"15m" : 42190.29, "last" : 42190.29, "buy" : 42190.29, "sell" : 42190.29, "symbol" : "R$"},
"CAD" : {"15m" : 14333.08, "last" : 14333.08, "buy" : 14333.08, "sell" : 14333.08, "symbol" : "$"},
"CHF" : {"15m" : 10673.07, "last" : 10673.07, "buy" : 10673.07, "sell" : 10673.07, "symbol" : "CHF"},
"CLP" : {"15m" : 7434392.59, "last" : 7434392.59, "buy" : 7434392.59, "sell" : 7434392.59, "symbol" : "$"},
"CNY" : {"15m" : 75156.46, "last" : 75156.46, "buy" : 75156.46, "sell" : 75156.46, "symbol" : "¥"},
"DKK" : {"15m" : 71737.73, "last" : 71737.73, "buy" : 71737.73, "sell" : 71737.73, "symbol" : "kr"},
"EUR" : {"15m" : 9612.76, "last" : 9612.76, "buy" : 9612.76, "sell" : 9612.76, "symbol" : "€"},
"GBP" : {"15m" : 8623.25, "last" : 8623.25, "buy" : 8623.25, "sell" : 8623.25, "symbol" : "£"},
"HKD" : {"15m" : 85401.39, "last" : 85401.39, "buy" : 85401.39, "sell" : 85401.39, "symbol" : "$"},
"INR" : {"15m" : 754314.17, "last" : 754314.17, "buy" : 754314.17, "sell" : 754314.17, "symbol" : "₹"},
"ISK" : {"15m" : 1361847.05, "last" : 1361847.05, "buy" : 1361847.05, "sell" : 1361847.05, "symbol" : "kr"},
"JPY" : {"15m" : 1189168.9, "last" : 1189168.9, "buy" : 1189168.9, "sell" : 1189168.9, "symbol" : "¥"},
"KRW" : {"15m" : 1.264483326E7, "last" : 1.264483326E7, "buy" : 1.264483326E7, "sell" : 1.264483326E7, "symbol" : "₩"},
"NZD" : {"15m" : 16314.17, "last" : 16314.17, "buy" : 16314.17, "sell" : 16314.17, "symbol" : "$"},
"PLN" : {"15m" : 40878.14, "last" : 40878.14, "buy" : 40878.14, "sell" : 40878.14, "symbol" : "zł"},
"RUB" : {"15m" : 689173.74, "last" : 689173.74, "buy" : 689173.74, "sell" : 689173.74, "symbol" : "RUB"},
"SEK" : {"15m" : 101337.77, "last" : 101337.77, "buy" : 101337.77, "sell" : 101337.77, "symbol" : "kr"},
"SGD" : {"15m" : 14791.27, "last" : 14791.27, "buy" : 14791.27, "sell" : 14791.27, "symbol" : "$"},
"THB" : {"15m" : 336488.84, "last" : 336488.84, "buy" : 336488.84, "sell" : 336488.84, "symbol" : "฿"},
"TWD" : {"15m" : 339094.86, "last" : 339094.86, "buy" : 339094.86, "sell" : 339094.86, "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 Blockchain 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 for anyone who had versions before last edit time.