Initial commit
This commit is contained in:
16
app/api/v2/coin_market_cap/assets.rb
Normal file
16
app/api/v2/coin_market_cap/assets.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module API
|
||||
module V2
|
||||
module CoinMarketCap
|
||||
class Assets < Grape::API
|
||||
desc 'Details on crypto currencies available on the exchange'
|
||||
get '/assets' do
|
||||
::Rails.cache.fetch(:currencies_cmc, expires_in: 600) do
|
||||
format_currencies(Currency.visible.coins.ordered.map)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user