Created
May 12, 2019 00:53
-
-
Save hgmiguel/98667aaa737269a71d54925f7ee78985 to your computer and use it in GitHub Desktop.
bitcoin watch with bitso
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
#!/bin/bash | |
NUMBER=$1 | |
BTC=$(curl --silent "https://api.bitso.com/v3/ticker/?book=btc_mxn" | jq -r '.payload.last') | |
echo "$BTC$NUMBER" | |
echo $BTC | |
while (( $(echo "$BTC$NUMBER" | bc -l) )) | |
do | |
echo $BTC | |
BTC=$(curl --silent "https://api.bitso.com/v3/ticker/?book=btc_mxn" | jq -r '.payload.last') | |
sleep 60 | |
done | |
echo "BAJO" | |
osascript -e 'display notification "Vendido" with title "BTC" sound name "Basso"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment