Module: CoingeckoRuby::Client::Coins
- Included in:
- CoingeckoRuby::Client
- Defined in:
- lib/coingecko_ruby/client/coins.rb
Instance Method Summary collapse
-
#coin(id, **options) ⇒ Hash
Fetches detailed current data for a coin.
-
#coins_list(**options) ⇒ Array<Hash>
Fetches the id, name, and symbol of every coin supported by CoinGecko’s API.
-
#get_coin_data(id:, options: {}) ⇒ Object
deprecated
Deprecated.
Use #coin instead
-
#get_markets(ids:, currency: 'usd', options: {}) ⇒ Object
deprecated
Deprecated.
Use #markets instead
-
#get_tickers(id:, options: {}) ⇒ Object
deprecated
Deprecated.
Use #tickers instead
-
#markets(ids, **options) ⇒ Array<Hash>
Fetches market data for a coin or a list of coins.
-
#tickers(id, **options) ⇒ Hash
Fetches the list of tickers (e.g: BTC-USD) for a coin.
Instance Method Details
#coin(id, **options) ⇒ Hash
Fetches detailed current data for a coin.
40 41 42 |
# File 'lib/coingecko_ruby/client/coins.rb', line 40 def coin(id, **) get "coins/#{id}", ** end |
#coins_list(**options) ⇒ Array<Hash>
Fetches the id, name, and symbol of every coin supported by CoinGecko’s API.
24 25 26 |
# File 'lib/coingecko_ruby/client/coins.rb', line 24 def coins_list(**) get 'coins/list', ** end |
#get_coin_data(id:, options: {}) ⇒ Object
Deprecated.
Use #coin instead
45 46 47 |
# File 'lib/coingecko_ruby/client/coins.rb', line 45 def get_coin_data(id:, options: {}) coin(id, **) end |
#get_markets(ids:, currency: 'usd', options: {}) ⇒ Object
Deprecated.
Use #markets instead
223 224 225 |
# File 'lib/coingecko_ruby/client/coins.rb', line 223 def get_markets(ids:, currency: 'usd', options: {}) markets(ids, vs_currency: currency, **) end |
#get_tickers(id:, options: {}) ⇒ Object
Deprecated.
Use #tickers instead
135 136 137 |
# File 'lib/coingecko_ruby/client/coins.rb', line 135 def get_tickers(id:, options: {}) tickers(id, **) end |
#markets(ids, **options) ⇒ Array<Hash>
Fetches market data for a coin or a list of coins.
218 219 220 |
# File 'lib/coingecko_ruby/client/coins.rb', line 218 def markets(ids, **) get 'coins/markets', ids: ids, ** end |
#tickers(id, **options) ⇒ Hash
Fetches the list of tickers (e.g: BTC-USD) for a coin
130 131 132 |
# File 'lib/coingecko_ruby/client/coins.rb', line 130 def tickers(id, **) get "coins/#{id}/tickers", ** end |