Last active
June 11, 2017 21:55
-
-
Save nicolasleander/603a471f9399631e59065dd2315fb0e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -e'require"json";require"net/http";loop{j=JSON.parse(Net::HTTP.get(URI("http://api.coinmarketcap.com/v1/ticker/")));system("clear");j[0,20].tap{puts "#{"-"*50}\n#{"Name".ljust(10)} Price \t%(1h) %(24h) %(7d)\n#{"-"*50}"}.each{|x|puts"#{x["symbol"].ljust(10)}$#{x["price_usd"]}\t#{x["percent_change_1h"]}%\t#{x["percent_change_24h"]}%\t#{x["percent_change_7d"]}%"};sleep(1)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
bash <(curl https://goo.gl/9cL6lf -Lfs)
.