Module: CoingeckoRuby::Client::Exchanges
- Included in:
- CoingeckoRuby::Client
- Defined in:
- lib/coingecko_ruby/client/exchanges.rb
Instance Method Summary collapse
-
#exchange(id) ⇒ Hash
Fetches complete data for a specific exchange.
-
#exchange_ids ⇒ Array<Hash>
Fetches exchange ids for every exchange currently supported by the CoinGecko API.
-
#exchange_status(id, **options) ⇒ Hash
Fetches news,announcments, and updates from a specific exchange.
-
#exchange_tickers(id, **options) ⇒ Hash
Fetches coin tickers from a specific exchange.
-
#exchange_volume(id, days: 7, **options) ⇒ Array<Array<Float, String>>
Fetches trade volume data from a specific exchange.
-
#exchanges(**options) ⇒ Array<Hash>
Fetches complete data for every exchange currently supported by the CoinGecko API.
-
#get_exchange_data(id:) ⇒ Object
deprecated
Deprecated.
Use #exchange instead
-
#get_exchange_status_updates(id:, options: {}) ⇒ Object
deprecated
Deprecated.
Use #exchange_status instead
-
#get_exchange_tickers(id:, options: {}) ⇒ Object
deprecated
Deprecated.
Use #exchange_tickers instead
-
#get_exchange_volume(id:, days:) ⇒ Object
deprecated
Deprecated.
Use #exchange_volume instead
-
#get_exchanges(options: {}) ⇒ Object
deprecated
Deprecated.
Use #exchanges instead
-
#get_exchanges_ids ⇒ Object
deprecated
Deprecated.
Use #exchange_ids instead
Instance Method Details
#exchange(id) ⇒ Hash
Fetches complete data for a specific exchange.
45 46 47 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 45 def exchange(id) get "exchanges/#{id}" end |
#exchange_ids ⇒ Array<Hash>
Fetches exchange ids for every exchange currently supported by the CoinGecko API.
71 72 73 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 71 def exchange_ids get 'exchanges/list' end |
#exchange_status(id, **options) ⇒ Hash
Fetches news,announcments, and updates from a specific exchange.
159 160 161 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 159 def exchange_status(id, **) get "exchanges/#{id}/status_updates", ** end |
#exchange_tickers(id, **options) ⇒ Hash
Fetches coin tickers from a specific exchange.
123 124 125 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 123 def exchange_tickers(id, **) get "exchanges/#{id}/tickers", ** end |
#exchange_volume(id, days: 7, **options) ⇒ Array<Array<Float, String>>
Fetches trade volume data from a specific exchange.
183 184 185 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 183 def exchange_volume(id, days: 7, **) get "exchanges/#{id}/volume_chart", days: days, ** end |
#exchanges(**options) ⇒ Array<Hash>
Fetches complete data for every exchange currently supported by the CoinGecko API.
28 29 30 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 28 def exchanges(**) get 'exchanges', ** end |
#get_exchange_data(id:) ⇒ Object
Use #exchange instead
50 51 52 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 50 def get_exchange_data(id:) exchange(id) end |
#get_exchange_status_updates(id:, options: {}) ⇒ Object
Use #exchange_status instead
164 165 166 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 164 def get_exchange_status_updates(id:, options: {}) exchange_status(id, **) end |
#get_exchange_tickers(id:, options: {}) ⇒ Object
Use #exchange_tickers instead
128 129 130 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 128 def get_exchange_tickers(id:, options: {}) exchange_tickers(id, **) end |
#get_exchange_volume(id:, days:) ⇒ Object
Use #exchange_volume instead
188 189 190 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 188 def get_exchange_volume(id:, days:) exchange_volume(id, days: days) end |
#get_exchanges(options: {}) ⇒ Object
Use #exchanges instead
33 34 35 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 33 def get_exchanges(options: {}) exchanges(**) end |
#get_exchanges_ids ⇒ Object
Use #exchange_ids instead
76 77 78 |
# File 'lib/coingecko_ruby/client/exchanges.rb', line 76 def get_exchanges_ids exchange_ids end |