module Cryptocompare::Exchanges

Constants

API_URL

Public Class Methods

all() click to toggle source

Get exchange data, such as cryptocurrencies that each exchange offers, and the supported conversion cryptocurrencies.

Returns

Hash

Hash of exchanges, cryptocurrencies that each exchange offers, and

the supported conversion cryptocurrencies.

Example

Get info for all exchanges.

Cryptocompare::Exchanges.all

Sample response

{
   "Coinbase" => {
      "LTC" => [
         "BTC",
         "USD",
         "EUR"
      ],
      "ETH" => [
         "BTC",
         "USD",
         "EUR"
      ],
      "BTC" => [
         "USD",
         "GBP",
         "EUR",
         "CAD"
      ],
      "BCH" => [
         "USD"
      ]
   },
   ...
}
# File lib/cryptocompare/exchanges.rb, line 48
def self.all
  api_resp = Faraday.get(API_URL)
  JSON.parse(api_resp.body)
end