Module: Cryptocompare::Exchanges
- Defined in:
- lib/cryptocompare/exchanges.rb
Class Method Summary collapse
-
.all ⇒ Object
Get exchange data, such as cryptocurrencies that each exchange offers, and the supported conversion cryptocurrencies.
Class Method Details
.all ⇒ Object
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"
]
},
...
}
49 50 51 52 |
# File 'lib/cryptocompare/exchanges.rb', line 49 def self.all api_resp = Faraday.get(API_URL) JSON.parse(api_resp.body) end |