Skip to content

Instantly share code, notes, and snippets.

/console Secret

Created January 18, 2014 23:07
Show Gist options
  • Save anonymous/63fd97e1db3f4b39b019 to your computer and use it in GitHub Desktop.
Save anonymous/63fd97e1db3f4b39b019 to your computer and use it in GitHub Desktop.
2.0.0-p247 :193 > btc_average.inject(0) { |sum, market| puts (market[1]) unless market[1]["rates"].nil? }
{"rates"=>{"ask"=>869.25, "bid"=>782.8, "last"=>781.47}, "source"=>"bitcoincharts", "volume_btc"=>0.0, "volume_percent"=>0.0}
{"rates"=>{"ask"=>806.65, "bid"=>805.65, "last"=>807.75}, "source"=>"api", "volume_btc"=>3080.76, "volume_percent"=>13.76}
{"rates"=>{"ask"=>809.0, "bid"=>801.05, "last"=>801.05}, "source"=>"api", "volume_btc"=>3.03, "volume_percent"=>0.01}
{"rates"=>{"ask"=>806.65, "bid"=>805.65, "last"=>806.65}, "source"=>"api", "volume_btc"=>6665.66, "volume_percent"=>29.78}
{"rates"=>{"ask"=>812.9, "bid"=>812.85, "last"=>812.85}, "source"=>"api", "volume_btc"=>6260.37, "volume_percent"=>27.97}
{"rates"=>{"ask"=>814.0, "bid"=>798.05, "last"=>814.3}, "source"=>"bitcoincharts", "volume_btc"=>59.7, "volume_percent"=>0.27}
{"rates"=>{"ask"=>838.99, "bid"=>810.81, "last"=>818.81}, "source"=>"api", "volume_btc"=>2.59, "volume_percent"=>0.01}
{"rates"=>{"ask"=>817.14, "bid"=>808.45, "last"=>820.53}, "source"=>"api", "volume_btc"=>1.48, "volume_percent"=>0.01}
{"rates"=>{"ask"=>835.77, "bid"=>819.54, "last"=>819.51}, "source"=>"api", "volume_btc"=>20.61, "volume_percent"=>0.09}
{"rates"=>{"ask"=>900.91, "bid"=>900.91, "last"=>900.91}, "source"=>"api", "volume_btc"=>292.04, "volume_percent"=>1.3}
{"rates"=>{"ask"=>912.19, "bid"=>912.05, "last"=>912.25}, "source"=>"api", "volume_btc"=>5996.45, "volume_percent"=>26.79}
{"rates"=>{"ask"=>822.5, "bid"=>817.5, "last"=>822.0}, "source"=>"api", "volume_btc"=>0.4, "volume_percent"=>0.0}
{"rates"=>{"ask"=>796.0, "bid"=>795.15, "last"=>796.0}, "source"=>"api", "volume_btc"=>0.61, "volume_percent"=>0.0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment