Skip to content

Instantly share code, notes, and snippets.

Created July 10, 2014 05:34
What would you like to do?
$ ruby x.rb
Address: 1FBVmnKtjgA676Xbatqx42dcGzaaPV4BU4 contains 4 transactions.
Address: 17j92xE73rEyexJSB4gwavd2YkpTKZWfAv contains 7 transactions.
require 'net/http'
require 'json'
require 'net/https'
require 'uri'
addrs = [
url = URI.parse(
http =, url.port)
req =
req.basic_auth('GUEST-TOKEN', '')
res = http.request(req)
txns = JSON.parse(res.body)
addrs.each_with_index do |addr, idx|
puts("Address: #{addr} contains #{txns[idx].length} transactions.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment