class Cryptoexchange::Exchanges::Aex::Services::Pairs
Constants
- PAIRS_URLS
Public Instance Methods
adapt(output, target)
click to toggle source
# File lib/cryptoexchange/exchanges/aex/services/pairs.rb, line 19 def adapt(output, target) pairs = [] output.each do |key, value| pairs << Cryptoexchange::Models::MarketPair.new( base: key, target: target, market: Aex::Market::NAME ) end pairs end
fetch()
click to toggle source
# File lib/cryptoexchange/exchanges/aex/services/pairs.rb, line 11 def fetch PAIRS_URLS.map do |endpoint| output = fetch_via_api(endpoint) target = endpoint.split("=").last adapt(output, target) end.flatten end