Class: Decommas::PriceService

Inherits:
Base
  • Object
show all
Defined in:
lib/decommas/price_service.rb

Constant Summary

Constants inherited from Base

Base::PAGINATION_LIMIT

Class Method Summary collapse

Methods inherited from Base

#attempt

Class Method Details

.dexes(chain:, options: {}) ⇒ Object



6
7
8
# File 'lib/decommas/price_service.rb', line 6

def dexes(chain:, options: {})
  wget("/dexes/#{chain}", query: options)
end

.get_price(chain:, dex:, tokens: [], options: {}) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/decommas/price_service.rb', line 10

def get_price(chain:, dex:, tokens: [], options: {})
  body = options.merge(
    chain: chain,
    dex: dex,
    tokens: tokens
  )
  wpost("/get_price", body: body)
end

.response_classObject



19
20
21
# File 'lib/decommas/price_service.rb', line 19

def response_class
  Decommas::Response::PriceService
end