Skip to content

Instantly share code, notes, and snippets.

@rynote
Created December 29, 2017 03:02
Show Gist options
  • Save rynote/b5315c6c978f55c5461cb0224ff5baf0 to your computer and use it in GitHub Desktop.
Save rynote/b5315c6c978f55c5461cb0224ff5baf0 to your computer and use it in GitHub Desktop.
#pass coin as argument and get price converted via btc-usdt rate
#ie. ./q.sh meme
#requires bc and jq
echo `curl -s https://bittrex.com/api/v1.1/public/getticker?market=btc-$1 | jq '.["result"]["Last"]' | awk '{ print sprintf("%.8f", $1); }'`"*"`curl -s https://bittrex.com/api/v1.1/public/getticker?market=USDT-BTC | jq '.["result"]["Last"]' | awk '{ print sprintf("%.2f", $1); }'` | bc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment