Cryptocurrency Prices

and UdjinM6

Display the spot USD prices of Bitcoin (from Coinbase) and the spot prices of 9 other cryptoassets (from Poloniex) including Monero, Ethereum, Decred, Ripple, Dash, Litecoin, Siacoin.

Image preview of Cryptocurrency Prices plugin.

CryptoPrices.5m.sh

Edit
Open on GitHub
#!/bin/bash
# <xbar.title>Cryptocurrency Prices</xbar.title>
# <xbar.version>v1.1</xbar.version>
# <xbar.author>viiraj, UdjinM6</xbar.author>
# <xbar.author.github>viiraj</xbar.author.github>
# <xbar.desc>Display the spot USD prices of Bitcoin (from Coinbase) and the spot prices of 9 other cryptoassets (from Poloniex) including Monero, Ethereum, Decred, Ripple, Dash, Litecoin, Siacoin.</xbar.desc>
# <xbar.image>https://media.giphy.com/media/xUPGcf2tFHHoAPssy4/giphy.gif</xbar.image>
#
# Based on the Monero BTC price at Poloniex Bitbar plugin by Monero.how (github.com/monerohow) and the Coinbase.com Bitcoin Prices Bitbar plugin by Charles Lenhert (github.com/CLL80). Thank you to the original coders who made this job very easy.
#
# If you feel this little tool gives you some value, tips are always welcome at the following addresses!
# Bitcoin: 1Gvf39okRwL3k2vtAYThSjx84j8CuX7rus
# Ethereum: 0x22112B4900950EC3e77e5eb4576647c7AF12B1BF
# Monero: 43WyVmecu3Q6xVMQm95aZGcvEsEGEu3jceg435QENEo2ifqwtJi8WQ4QxhWvQ1wWUmjbFzfSjx3PoDGUhFZnahav9d4DYy9
# Decred: DsndNAGHUrjVsm217nqyHynmPSa1f47AbUm


# shellcheck disable=SC2034
bitcoin_icon='iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAABYlAAAWJQFJUiTwAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEe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/f3+AgICBgYGCgoKDg4OEhISFhYWGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6Pj4+QkJCRkZGSkpKTk5OUlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJydnZ2enp6fn5+goKChoaGioqKjo6OkpKSlpaWmpqanp6eoqKipqamqqqqrq6usrKytra2urq6vr6+wsLCxsbGysrKzs7O0tLS1tbW2tra3t7e4uLi5ubm6urq7u7u8vLy9vb2+vr6/v7/AwMDBwcHCwsLDw8PExMTFxcXGxsbHx8fIyMjJycnKysrLy8vMzMzNzc3Ozs7Pz8/Q0NDR0dHS0tLT09PU1NTV1dXW1tbX19fY2NjZ2dna2trb29vc3Nzd3d3e3t7f39/g4ODh4eHi4uLj4+Pk5OTl5eXm5ubn5+fo6Ojp6enq6urr6+vs7Ozt7e3u7u7v7+/w8PDx8fHy8vLz8/P09PT19fX29vb39/f4+Pj5+fn6+vr7+/v8/Pz9/f3+/v7////Ybd+0AAAAEHRSTlMAAiZvcHF+f7Kztbbm5/b3GL4FdwAAAItJREFUeJxtj0cWwjAMROWCC9iJTU3obe5/RSLFsOJvRp6nkSWiCe1jztFrmlGLvgi9VfJelR9LdixXI3BjNVNe+u/AKClNXnofwEYKR5FlB7yOYgTKLFfgeRAjiXEGMJRmcGR4A+taq0R46B4zJx7K316asS2dbot9Mf9WJ2XbcZ1R7V7tQkrByfkfCTkPOQ2ZcvUAAAAASUVORK5CYII='

#spot_price=$(curl -s "https://api.coinbase.com/v2/prices/:currency_pair/spot" -H "CB-VERSION: 2017-04-16" | egrep -o '{"data":{"amount":"[0-9]+(\.)?' | sed 's/{"data":{"amount"://'  | sed 's:^.\(.*\).$:\1:')
#buy_price=$(curl -s "https://api.coinbase.com/v2/prices/BTC-USD/buy" -H "CB-VERSION: 2017-04-16" | egrep -o '{"data":{"amount":"[0-9]+(\.)?' | sed 's/{"data":{"amount"://'  | sed 's:^.\(.*\).$:\1:')
#sell_price=$(curl -s "https://api.coinbase.com/v2/prices/BTC-USD/sell" -H "CB-VERSION: 2017-04-16" | egrep -o '{"data":{"amount":"[0-9]+(\.)?' | sed 's/{"data":{"amount"://'  | sed 's:^.\(.*\).$:\1:')


xmrPoloniex=$(curl -s https://poloniex.com/public?command=returnTicker | tr '}' '\n' | grep BTC_XMR | tr -d '{}"' | tr ':,' '\n' | grep -A1 "last" | tail -1)
ethPoloniex=$(curl -s https://poloniex.com/public?command=returnTicker | tr '}' '\n' | grep BTC_ETH | tr -d '{}"' | tr ':,' '\n' | grep -A1 "last" | tail -1)
dcrPoloniex=$(curl -s https://poloniex.com/public?command=returnTicker | tr '}' '\n' | grep BTC_DCR | tr -d '{}"' | tr ':,' '\n' | grep -A1 "last" | tail -1)
xrpPoloniex=$(curl -s https://poloniex.com/public?command=returnTicker | tr '}' '\n' | grep BTC_XRP | tr -d '{}"' | tr ':,' '\n' | grep -A1 "last" | tail -1)
dashPoloniex=$(curl -s https://poloniex.com/public?command=returnTicker | tr '}' '\n' | grep BTC_DASH | tr -d '{}"' | tr ':,' '\n' | grep -A1 "last" | tail -1)
ltcPoloniex=$(curl -s https://poloniex.com/public?command=returnTicker | tr '}' '\n' | grep BTC_LTC | tr -d '{}"' | tr ':,' '\n' | grep -A1 "last" | tail -1)
siaPoloniex=$(curl -s https://poloniex.com/public?command=returnTicker | tr '}' '\n' | grep BTC_SC | tr -d '{}"' | tr ':,' '\n' | grep -A1 "last" | tail -1)


#echo  "$spot_price | templateImage=$bitcoin_icon" ß

btc_usd=$(curl -s "https://api.bitfinex.com/v1/pubticker/BTCUSD" | tr '"' '\n' | grep -A2 last_price | tail -1)
printf "%.*f | image=%s\n" 2 "$btc_usd" "$bitcoin_icon"
printf "%.*f | image=%s\n" 8 "$ethPoloniex" "$eth_icon"
printf "%.*f | image=%s\n" 8 "$xrpPoloniex" "$xrp_icon"
printf "%.*f | image=%s\n" 5 "$ltcPoloniex" "$ltc_icon"
printf "%.*f | image=%s\n" 5 "$xmrPoloniex" "$monero_icon"
printf "%.*f | image=%s\n" 5 "$dashPoloniex" "$dash_icon"
printf "%.*f | image=%s\n" 5 "$dcrPoloniex" "$dcr_icon"
printf "%.*f | image=%s\n" 8 "$siaPoloniex" "$sia_icon"