class Cryptoexchange::Exchanges::Huobi::Services::Pairs
Constants
- PAIRS_URLS
Public Instance Methods
adapt(output)
click to toggle source
# File lib/cryptoexchange/exchanges/huobi/services/pairs.rb, line 16 def adapt(output) output['data'].map do |pair| Cryptoexchange::Models::MarketPair.new({ base: pair['base-currency'], target: pair['quote-currency'], market: Huobi::Market::NAME }) end end
fetch()
click to toggle source
# File lib/cryptoexchange/exchanges/huobi/services/pairs.rb, line 9 def fetch PAIRS_URLS.map do |endpoint| output = fetch_via_api(endpoint) adapt(output) end.flatten end