Module: Bibox::Rest::Public::OrderBook

Included in:
Client
Defined in:
lib/bibox/rest/public/order_book.rb

Instance Method Summary collapse

Instance Method Details

#order_book(pair: "BIX_ETH", size: 200, options: {}) ⇒ Object



6
7
8
9
10
11
# File 'lib/bibox/rest/public/order_book.rb', line 6

def order_book(pair: "BIX_ETH", size: 200, options: {})
  path        =   "/mdata"
  params      =   {cmd: "depth", pair: pair, size: size}
  response    =   parse(get(path, params: params, options: options))&.fetch("result", {})
  ::Bibox::Models::OrderBook.new(response) if response
end