Posted this in the old topic thought some of you might find it useful re-adding it to this new topic.
Simple script for keeping eyes on your miners and the pool and some other network stats and latest BTC price with a simple python script.
Just put your Bitcoin address you use to mine to into lines.
#41 req = urllib2.Request("
http://solo.ckpool.org/users/YOURADDRESSHERE")
# 189 req = urllib2.Request("
https://blockchain.info/balance?active=YOURADDRESSHERE")
To change the time out edit line 210
Copy the code below and save it as MinerCheck.py
then just run python MinerCheck.py
# CK Solo Pool Python Miner & Pool Monitor
# Donations welcome : 3JjsGHYQH8yVJA5G4mgPNHuoX4DHmU5fis
# users change the bitcoin address in line 41 & line 189 to there own worker
# timeout is 160 sec between requests line 210
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 anonymous solo 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/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/balance?active=YOURADDRESSHERE")
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 @ CK SOLO **"
print " ** http://solo.ckpool.org | No fuss anonymous solo 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
Script work flow
`1. Get Pool Status
2. Get Miner Status
3. Get Latest Block Hash
4. Get Current Network Hash rate
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 clears terminal before next request.. Repeat.
API's used :
Blockchain API
BlockCypher API
Coinbase API
Enjoy!