Class: QuidaxQuote

Inherits:
QuidaxBaseObject show all
Defined in:
lib/quidax/objects/quote.rb

Overview

Object for quotes

Instance Attribute Summary

Attributes inherited from QuidaxBaseObject

#quidax

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from QuidaxBaseObject

get_request, #initialize, post_request, put_request, url

Constructor Details

This class inherits a constructor from QuidaxBaseObject

Class Method Details

.get(q_object:, query:) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/quidax/objects/quote.rb', line 9

def self.get(q_object:, query:)
  query.stringify_keys!
  Utils.check_missing_keys(required_keys: %w[market unit kind volume], keys: query.keys, field: "query")
  Utils.validate_value_in_array(array: %w[ask bid], value: query["kind"], field: 'query["kind"]')

  path = API::QUOTE_PATH

  get_request(q_object, path, query)
end

Instance Method Details

#get(query:) ⇒ Object



5
6
7
# File 'lib/quidax/objects/quote.rb', line 5

def get(query:)
  QuidaxQuote.get(q_object: @quidax, query: query)
end