Files
Dena/app/api/v2/coin_market_cap/summary.rb
2026-08-13 19:50:53 +03:30

19 lines
492 B
Ruby

# frozen_string_literal: true
module API
module V2
module CoinMarketCap
class Summary < Grape::API
desc 'Overview of market data for all tickers and all market pairs on the exchange'
get '/summary' do
::Rails.cache.fetch(:markets_summary_cmc, expires_in: 60) do
::Market.enabled.ordered.map do |market|
format_summary(TickersService[market].ticker, market)
end
end
end
end
end
end
end