Method: Kaesen::Lakebtc#depth
- Defined in:
- lib/kaesen/lakebtc.rb
#depth ⇒ hash
This method is abstract.
Get order book.
67 68 69 70 71 72 73 74 |
# File 'lib/kaesen/lakebtc.rb', line 67 def depth h = get_ssl(@url_public + "/bcorderbook?symbol=btcjpy") # the id of BTCJPY is 5. { "asks" => h["asks"].map{|a,b| [BigDecimal.new(a.to_s), BigDecimal.new(b.to_s)]}, # to_s でないと誤差が生じる "bids" => h["bids"].map{|a,b| [BigDecimal.new(a.to_s), BigDecimal.new(b.to_s)]}, # to_s でないと誤差が生じる "ltimestamp" => Time.now.to_i, } end |