class Straight::ExchangeRate::KrakenAdapter

Constants

FETCH_URL

Public Instance Methods

rate_for(currency_code) click to toggle source
# File lib/straight/exchange_rate_adapters/kraken_adapter.rb, line 8
def rate_for(currency_code)
  super
  rate = get_rate_value_from_hash(@rates, 'result', 'XXBTZ' + currency_code.upcase, 'c')
  rate = rate.kind_of?(Array) ? rate.first : raise(CurrencyNotSupported)
  rate_to_f(rate)
end