Small update today. I added JSON API for profile page and token mechanism to authenticate against it without need of login/password in your scripts. I see that many of you are downloading profile page and parse it periodically. This API is now preferred way to check your account balance.
For API interface instructions, follow
the link on top of your profile page.
This is great, I was one of the guys scraping the page (5 minutes, I figured what's the harm), but this makes it so much easier.
For those of you using Munin, now you can monitor the pools like I do:
#!/bin/bash
case $1 in
config)
echo "graph_title Pool reward"
echo "graph_vlabel BTC"
echo "confirmed_reward.label Confirmed Reward"
echo "total_reward.label Total Reward"
echo "graph_category Bitcoin"
exit 0;;
esac
CURL_OPTS="-btmp/cookies.txt -ctmp/cookies.txt -L -s --max-time 3 -k"
URL="https://mining.bitcoin.cz/accounts/profile/json/YOUR_TOKEN_HERE"
PROFILE=`curl $CURL_OPTS $URL`
CONFIRMED=`echo $PROFILE | grep -E '"confirmed_reward": "[0-9\.]+"' -o | awk '{print $2}' | sed 's/"//g'`
UNCONFIRMED=`echo $PROFILE | grep -E '"unconfirmed_reward": "[0-9\.]+"' -o | awk '{print $2}' | sed 's/"//g'`
TOTAL=`echo "scale=8; $CONFIRMED + $UNCONFIRMED" | bc`
echo total_reward.value $TOTAL
echo confirmed_reward.value $CONFIRMED
Just add your token and drop it intoetc/munin/plugins/ ^^
The graphs look like this:
