Skip to content

Instantly share code, notes, and snippets.

@Alanaktion
Created June 27, 2017 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alanaktion/a9905c64ab491fd4fcc3609905249318 to your computer and use it in GitHub Desktop.
Save Alanaktion/a9905c64ab491fd4fcc3609905249318 to your computer and use it in GitHub Desktop.
Cryptocurrency exchange rate ticker
#!/bin/bash
btc=$(curl -s https://api.coinbase.com/v2/prices/BTC-USD/buy | json data.amount)
eth=$(curl -s https://api.coinbase.com/v2/prices/ETH-USD/buy | json data.amount)
ltc=$(curl -s https://api.coinbase.com/v2/prices/LTC-USD/buy | json data.amount)
echo 'BTC $'$btc' ETH $'$eth' LTC $'$ltc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment