A touch bar widget for crypto currency price (Bitcoin, Ethereum, and Litecoin)
- Install BetterTouchBarTool - https://www.boastr.net/downloads/
- Install Homebrew - https://brew.sh/
- Install jq - open terminal and type
brew install jq
- Download - touchbar_crypto.json https://github.com/jimmyadg/crypto_touchbar/blob/master/touchbar_crypto.json
Launch BetterTouchBarTool and go to Preferences, click Manage Presets ,and import touchbar_crypto.json into BetterTouchBarTool. Enjoy!
Bitcoin and Ethereum prices are both from Gemini exchange, and Litcoin price is from Bitstamp exchange.
I am using the web API by cryptocompare.com, which you can easily point the widget to your desired exchange and fiat currency by editing COIN and EXCHANGE in the url below
https://min-api.cryptocompare.com/data/price?fsym=COIN&tsyms=USD&e=EXCHANGE
ex: https://min-api.cryptocompare.com/data/price?fsym=LTC&tsyms=USD&e=GDAX
For more information on the API please visit https://www.cryptocompare.com/api/#-api-data-price-
Adding price ticker for other coin is easy
Simply click the +Widget button in BetterTouchBarTool's Preferences and assign the widget to "Run Apple Script and Show Return Value"
If you are unfamiliar with Apple Script, you can copy and paste the template code below and follow the configuration section to assign the widge to your desired coin.
set p to do shell script "curl 'https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD&e=Gemini' | /usr/local/bin/jq .USD"
return "$" & p