Skip to content

Instantly share code, notes, and snippets.

@hgmiguel
Created May 12, 2019 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgmiguel/98667aaa737269a71d54925f7ee78985 to your computer and use it in GitHub Desktop.
Save hgmiguel/98667aaa737269a71d54925f7ee78985 to your computer and use it in GitHub Desktop.
bitcoin watch with bitso
#!/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