Created
November 24, 2021 02:14
-
-
Save bensig/48c2df965b036f28e15a143233e03ab9 to your computer and use it in GitHub Desktop.
Script to get bitcoin balance of any BTC address
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 | |
# description: prints balance for any bitcoin address | |
# requirements: jq and curl | |
# usage: $ bitcoinbalance.sh btcaddress | |
curl -s https://api.blockcypher.com/v1/btc/main/addrs/$1 | jq '.balance' | awk '{print $1/100000000}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment