Ethereum Price Terminal Ticker

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
function eth_price_ticker {
    ruby -rjson -rnet/http -e '
        C = "https://www.bitstamp.net/api/v2/ticker/etheur"
        loop { 
            puts "[ETHEURO] " + Time.now.to_s + ": €" + 
            JSON.parse(
                Net::HTTP.get_response(URI(C)).body
            )["last"].to_f.round.to_s;
            sleep 5
        }
    '
}