Class: CoinMarketCapitalization::Exchange

Inherits:
Base
  • Object
show all
Defined in:
lib/coin_market_capitalization/exchange.rb

Overview

Exchange class - contains methods mapped to API endpoints for cryptocurrency exchanges. This category currently includes 6 endpoints

Constant Summary collapse

BASE_URL =
"https://pro-api.coinmarketcap.com/v1/exchange"
END_POINT_ENTRIES =
%w[
  map
  info
  listings/latest
  quotes/latest
  quotes/historical
  market-pairs/latest
].freeze

Instance Attribute Summary

Attributes inherited from Base

#adapter, #api_key, #base_url

Instance Method Summary collapse

Methods inherited from Base

#connection

Constructor Details

#initialize(api_key:, base_url: BASE_URL, adapter: Faraday.default_adapter) ⇒ Exchange

Returns a new instance of Exchange.



17
18
19
# File 'lib/coin_market_capitalization/exchange.rb', line 17

def initialize(api_key:, base_url: BASE_URL, adapter: Faraday.default_adapter)
  super
end