Module: Bibox::Rest::Public::Pairs

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

Instance Method Summary collapse

Instance Method Details

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



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

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

#pairs(options: {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/bibox/rest/public/pairs.rb', line 13

def pairs(options: {})
  path        =   "/mdata"
  params      =   {cmd: "marketAll"}
  response    =   parse(get(path, params: params, options: options))&.fetch("result", {})
  ::Bibox::Models::Pair.parse(response) if response
end