Bash function for checking crypto prices

Very lightweight way of checking the prices for ETH, BTC, LTC or whatever suits you the most.

Add to your .zshrc or .bashrc. Requires jq.

function price() {
  local pair="${1:-etheur}" # default pair
  local exchange="${2:-kraken}" # default exchange
  curl -s "https://api.cryptowat.ch/markets/$exchange/$pair/price" | jq ".result.price"
}

Usage

 $ price
 809
 $ price btcusd
 16015
 $ price btcusd gdax
 15970