module Cryptopia::Api::Public
Public Instance Methods
currencies()
click to toggle source
# File lib/cryptopia/api/public.rb, line 4 def currencies handle_response(self.class.get('/GetCurrencies')) end
market(market, options = {})
click to toggle source
# File lib/cryptopia/api/public.rb, line 16 def market(market, options = {}) handle_response(Market.new(self.class.base_uri).find(market, options)) end
market_history(market, options = {})
click to toggle source
# File lib/cryptopia/api/public.rb, line 20 def market_history(market, options = {}) handle_response(Market.new(self.class.base_uri).history(market, options)) end
market_order_groups(markets = [], options = {})
click to toggle source
# File lib/cryptopia/api/public.rb, line 28 def market_order_groups(markets = [], options = {}) handle_response(Market.new(self.class.base_uri).order_groups(markets, options)) end
market_orders(market, options = {})
click to toggle source
# File lib/cryptopia/api/public.rb, line 24 def market_orders(market, options = {}) handle_response(Market.new(self.class.base_uri).orders(market, options)) end
markets(options = {})
click to toggle source
# File lib/cryptopia/api/public.rb, line 12 def markets(options = {}) handle_response(Market.new(self.class.base_uri).all(options)) end
trade_pairs()
click to toggle source
# File lib/cryptopia/api/public.rb, line 8 def trade_pairs handle_response(self.class.get('/GetTradePairs')) end
Private Instance Methods
handle_response(response)
click to toggle source
# File lib/cryptopia/api/public.rb, line 34 def handle_response(response) response.code == 200 ? response.to_h : {} end