Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Monacoin price notifier

Monacoin price notifier


brew install jq


curl -sSo /usr/local/bin/monacoin && chmod +x /usr/local/bin/monacoin

Or create file /usr/local/bin/monacoin by yourself.



Execute every 3 hours by launchagents

Add plist file to ~/Library/LaunchAgents/

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
    <integer>60 * 60 * 3</integer>

Set to launchagents

launchctl setenv PATH /usr/local/bin:$PATH
launchctl load ~/Library/LaunchAgents/monacoin.price.plist
# $ monacoin
# 85.6
# Get price
MONA=`curl -s | jq .last_price`
# macOS notifier
osascript -e "display notification \"$MONA\" with title \"Monacoin\""
# print
echo $MONA
# speaking
say "monacoin $MONA"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.