Created
November 16, 2020 21:55
-
-
Save buzzkillb/d4fd9600961e7103c374e2077c5a97b2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
#Denarius block 43891 is first day after 3,000,000 | |
#curl chainz daily emissions API and convert to json for maximum zombies | |
DAILYCOUNTER=43891 | |
while [ $DAILYCOUNTER -lt 43894 ]; do | |
chainzDaily=$(curl -s "https://chainz.cryptoid.info/explorer/overview.day.dws?coin=d&d=${DAILYCOUNTER}&f=7331209.21602584.js") | |
chainzDay=$(echo $chainzDaily | jq '.d') | |
chainzMinh=$(echo $chainzDaily | jq '.minh') | |
chainzMaxh=$(echo $chainzDaily | jq '.maxh') | |
chainztxc=$(echo $chainzDaily | jq '.txc') | |
chainztxa=$(echo $chainzDaily | jq '.txa') | |
chainzMind=$(echo $chainzDaily | jq '.mind') | |
chainzMaxd=$(echo $chainzDaily | jq '.maxd') | |
chainzGen=$(echo $chainzDaily | jq '.gen') | |
printf '{"day":"%s","minh":"%s","maxh":"%s","txc":"%s","txa":"%s","mind":"%s","maxd":"%s","gen":"%s"}\n' "$chainzDay" "$chainzMinh" "$chainzMaxh" "$chainztxc" "$chainztxa" "$chainzMind" "$chainzMaxd" "$chainzGen" | |
let DAILYCOUNTER=DAILYCOUNTER+1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment