Posts

Flexing CUB and LEO prices on my MacBook Pro TouchBar

avatar of @contrabourdon
25
·
0 views
·
1 min read

Over a year ago, I wrote about the Mac Touch Bar script to track the STEEM/SBD price. For obvious reasons, we don't care much for this now but I resurrected my little BetterTouchTool app, with jq (for json parsing) and the @coingecko API for CUB and LEO prices.

It's pretty simple to setup:

#! /bin/bash 
 
output=$(curl -s "https://api.coingecko.com/api/v3/simple/price?ids=CUB-FINANCE&vs_currencies=USD"); 
cub=$(echo $output | /usr/local/bin/jq ".\"cub-finance\".usd"); 
cub=$(printf "%0.3f" $cub); 
echo "\$$cub" 

Rinse and repeat for LEO. It's pretty sexy isn't it?

Posted Using LeoFinance Beta