Created
February 16, 2021 14:08
-
-
Save FaceTheWolf/58dd23e606c4f1b56c457a3248f73c30 to your computer and use it in GitHub Desktop.
Ethermine stats getter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
miner="df2c6f7afc1a58783e15f2ae0118ff039d8a4755" | |
stats="$(curl -s https://api.ethermine.org/miner/${miner}/currentStats)" | |
# Using jq to parse json response | |
# https://github.com/stedolan/jq | |
printf %.4f $(echo "$float/1.18" | echo $stats | /usr/local/bin/jq ".data.unpaid"/1000000000000000000) | |
printf "ETH + " | |
printf %.2f $(echo "$float/1.18" | echo $stats | /usr/local/bin/jq ".data.usdPerMin"*60) | |
printf "$/h (" | |
printf $(echo $stats | /usr/local/bin/jq ".data.activeWorkers") | |
printf ")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example output
That is 0.1234ETH unpaid, at 0.42 USD pr. hour from 5 workers.
See https://ethermine.org/api/miner