class CoinMarketPro::Endpoint::GlobalMetrics

@see pro.coinmarketcap.com/api/v1#tag/exchange

Constants

ENDPOINT

Public Instance Methods

market_quotes(**args)
Alias for: quotes
market_quotes_historical(**args)
Alias for: quotes_historical
quotes(**args) click to toggle source

Get the latest quote of aggregate market metrics.

Use the "convert" option to return market values in multiple fiat and cryptocurrency conversions in the same call.

@param [Hash] args @option args [String] :convert @return [CoinMarketPro::Result]

@see pro.coinmarketcap.com/api/v1#operation/getV1GlobalmetricsQuotesLatest

# File lib/coin_market_pro/endpoint/global_metrics.rb, line 37
def quotes(**args)
  params = convert_params(args)
  client.get("#{ENDPOINT}/quotes/latest", options: params.compact).tap do |resp|
    resp.body = [resp.body]
  end
end
Also aliased as: market_quotes, quotes_latest
quotes_historical(**args) click to toggle source

Get an interval of aggregate 24 hour volume and market cap data globally based on time and interval parameters.

@param [Hash] args @option args [String] :time_start @option args [String] :time_end @option args [Number] :count @option args [String] :interval @option args [String] :convert @return [CoinMarketPro::Result]

@see pro.coinmarketcap.com/api/v1#operation/getV1ExchangeQuotesHistorical

# File lib/coin_market_pro/endpoint/global_metrics.rb, line 20
def quotes_historical(**args)
  params = convert_params(args)
  client.get("#{ENDPOINT}/quotes/historical", options: params.compact).tap do |resp|
    resp.body = resp.body[:quotes]
  end
end
Also aliased as: market_quotes_historical
quotes_latest(**args)
Alias for: quotes