coingecko_ruby 0.2.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +31 -0
  3. data/.gitignore +11 -0
  4. data/.travis.yml +6 -0
  5. data/CHANGELOG.md +44 -0
  6. data/Gemfile +16 -0
  7. data/Gemfile.lock +37 -0
  8. data/README.md +7 -5
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/coingecko_ruby.gemspec +5 -5
  12. data/fixtures/vcr_cassettes/test_that_it_gets_a_coins_complete_current_data.yml +74 -0
  13. data/fixtures/vcr_cassettes/test_that_it_gets_a_coins_tickers.yml +99 -0
  14. data/fixtures/vcr_cassettes/test_that_it_gets_a_derivative_exchange.yml +71 -0
  15. data/fixtures/vcr_cassettes/test_that_it_gets_a_specific_exchange_ticker_from_an_exchange.yml +145 -0
  16. data/fixtures/vcr_cassettes/test_that_it_gets_btc_to_eth_exchange_rate.yml +120 -0
  17. data/fixtures/vcr_cassettes/test_that_it_gets_btc_to_usd_exchange_rate.yml +122 -0
  18. data/fixtures/vcr_cassettes/test_that_it_gets_complete_data_for_an_exchange.yml +72 -0
  19. data/fixtures/vcr_cassettes/test_that_it_gets_daily_historical_prices_for_one_coin.yml +120 -0
  20. data/fixtures/vcr_cassettes/test_that_it_gets_derivative_exchanges.yml +79 -0
  21. data/fixtures/vcr_cassettes/test_that_it_gets_derivatives.yml +1732 -0
  22. data/fixtures/vcr_cassettes/test_that_it_gets_derivatives_exchanges_ids_and_names.yml +95 -0
  23. data/fixtures/vcr_cassettes/test_that_it_gets_event_countries.yml +76 -0
  24. data/fixtures/vcr_cassettes/test_that_it_gets_event_types.yml +71 -0
  25. data/fixtures/vcr_cassettes/test_that_it_gets_exchange_ids_supported_by_coingecko.yml +159 -0
  26. data/fixtures/vcr_cassettes/test_that_it_gets_exchange_tickers_from_an_exchange.yml +78 -0
  27. data/fixtures/vcr_cassettes/test_that_it_gets_finance_platforms.yml +95 -0
  28. data/fixtures/vcr_cassettes/test_that_it_gets_finance_products.yml +100 -0
  29. data/fixtures/vcr_cassettes/test_that_it_gets_global_crypto_data.yml +71 -0
  30. data/fixtures/vcr_cassettes/test_that_it_gets_global_defi_data.yml +71 -0
  31. data/fixtures/vcr_cassettes/test_that_it_gets_historical_price_for_one_coin_at_a_previous_date.yml +173 -0
  32. data/fixtures/vcr_cassettes/test_that_it_gets_hourly_historical_prices_for_one_coin.yml +120 -0
  33. data/fixtures/vcr_cassettes/test_that_it_gets_indexes.yml +127 -0
  34. data/fixtures/vcr_cassettes/test_that_it_gets_indexes_by_market_id_and_coin_id.yml +66 -0
  35. data/fixtures/vcr_cassettes/test_that_it_gets_indexes_by_market_id_and_index_id.yml +71 -0
  36. data/fixtures/vcr_cassettes/test_that_it_gets_indexes_ids.yml +630 -0
  37. data/fixtures/vcr_cassettes/test_that_it_gets_last_7_days_exchange_volume_from_an_exchange.yml +120 -0
  38. data/fixtures/vcr_cassettes/test_that_it_gets_market_data_for_a_coin.yml +169 -0
  39. data/fixtures/vcr_cassettes/test_that_it_gets_market_data_for_a_coin_in_myr.yml +120 -0
  40. data/fixtures/vcr_cassettes/test_that_it_gets_market_data_for_multiple_coins_in_eth.yml +120 -0
  41. data/fixtures/vcr_cassettes/test_that_it_gets_minutely_historical_prices_for_one_coin.yml +188 -0
  42. data/fixtures/vcr_cassettes/test_that_it_gets_ohlc_data_for_one_coin_in_the_last_30_days_in_myr.yml +120 -0
  43. data/fixtures/vcr_cassettes/test_that_it_gets_ohlc_data_for_one_coin_in_the_last_7_days.yml +120 -0
  44. data/fixtures/vcr_cassettes/test_that_it_gets_price_for_multiple_coins.yml +71 -0
  45. data/fixtures/vcr_cassettes/test_that_it_gets_price_for_multiple_coins_in_different_currencies.yml +71 -0
  46. data/fixtures/vcr_cassettes/test_that_it_gets_price_for_one_coin.yml +122 -0
  47. data/fixtures/vcr_cassettes/test_that_it_gets_price_for_one_coin_in_a_different_currency.yml +120 -0
  48. data/fixtures/vcr_cassettes/test_that_it_gets_simple_price_for_one_coin.yml +73 -0
  49. data/fixtures/vcr_cassettes/test_that_it_gets_status_updates.yml +79 -0
  50. data/fixtures/vcr_cassettes/test_that_it_gets_status_updates_for_an_exchange.yml +76 -0
  51. data/fixtures/vcr_cassettes/test_that_it_gets_the_list_of_asset_platforms.yml +80 -0
  52. data/fixtures/vcr_cassettes/test_that_it_gets_the_list_of_categories.yml +114 -0
  53. data/fixtures/vcr_cassettes/test_that_it_gets_the_list_of_categories_with_market_data.yml +100 -0
  54. data/fixtures/vcr_cassettes/test_that_it_gets_the_list_of_supported_coins.yml +143 -0
  55. data/fixtures/vcr_cassettes/test_that_it_gets_the_list_of_supported_exchanges.yml +79 -0
  56. data/fixtures/vcr_cassettes/test_that_it_gets_the_list_supported_coins.yml +74 -0
  57. data/fixtures/vcr_cassettes/test_that_it_gets_trending_searches.yml +77 -0
  58. data/lib/coingecko_ruby/client.rb +16 -0
  59. data/lib/coingecko_ruby/client/categories.rb +42 -363
  60. data/lib/coingecko_ruby/client/coins.rb +32 -31
  61. data/lib/coingecko_ruby/client/derivatives.rb +154 -0
  62. data/lib/coingecko_ruby/client/events.rb +84 -0
  63. data/lib/coingecko_ruby/client/exchanges.rb +51 -1458
  64. data/lib/coingecko_ruby/client/finance.rb +100 -0
  65. data/lib/coingecko_ruby/client/indexes.rb +88 -0
  66. data/lib/coingecko_ruby/client/infos.rb +174 -0
  67. data/lib/coingecko_ruby/client/prices.rb +85 -269
  68. data/lib/coingecko_ruby/client/status.rb +1 -1
  69. data/lib/coingecko_ruby/connection.rb +5 -9
  70. data/lib/coingecko_ruby/version.rb +1 -1
  71. metadata +60 -2
@@ -3,13 +3,13 @@ module CoingeckoRuby
3
3
  module Coins
4
4
  # Fetches the id, name, and symbol of every coin supported by CoinGecko's API.
5
5
  #
6
- # @param include_contract_address [Boolean] displays the coin's platform contract address (e.g. 0x... for ETH-based tokens)
6
+ # @option options include_platform [Boolean] displays the coin's platform contract address (e.g. 0x... for ETH-based tokens)
7
7
  #
8
8
  # @return [Array<Hash>] returns an array of hashes for every supported coin's id, name, symbol, and platform contract address (optional).
9
9
  #
10
10
  # @example Fetch the list of coins supported by CoinGecko's API.
11
11
  # client.coins_list
12
- # @example Response object (truncated)
12
+ # @example Sample response object (truncated)
13
13
  # [
14
14
  # {
15
15
  # "id" => "01coin",
@@ -20,21 +20,9 @@ module CoingeckoRuby
20
20
  # "symbol" => "algohalf",
21
21
  # "name" => "0.5X Long Algorand Token"
22
22
  # }, {
23
- # "id" => "0-5x-long-altcoin-index-token",
24
- # "symbol" => "althalf",
25
- # "name" => "0.5X Long Altcoin Index Token"
26
- # }, {
27
- # "id" => "0-5x-long-balancer-token",
28
- # "symbol" => "balhalf",
29
- # "name" => "0.5X Long Balancer Token"
30
- # }, {
31
- # "id" => "0-5x-long-bitcoin-cash-token",
32
- # "symbol" => "bchhalf",
33
- # "name" => "0.5X Long Bitcoin Cash Token"
34
- # },
35
23
  # ]
36
- def coins_list(include_contract_address: false)
37
- get 'coins/list', { include_contract_address: include_contract_address }
24
+ def coins_list(**options)
25
+ get 'coins/list', options
38
26
  end
39
27
 
40
28
  # Fetches detailed current data for a coin.
@@ -48,16 +36,21 @@ module CoingeckoRuby
48
36
  # @return [Hash] returns comprehensive current data for the given coin.
49
37
  #
50
38
  # @example Fetch Bitcoin's current data.
51
- # client.get_coin_data(id: 'bitcoin')
39
+ # client.coin('bitcoin')
40
+ def coin(id, **options)
41
+ get "coins/#{id}", options
42
+ end
43
+
44
+ # @deprecated Use {#coin} instead
52
45
  def get_coin_data(id:, options: {})
53
- get "coins/#{id}", { options: options }
46
+ coin(id, **options)
54
47
  end
55
48
 
56
49
  # Fetches the list of tickers (e.g: BTC-USD) for a coin
57
50
  #
58
51
  # @param id [String] the coin id to fetch.
59
- # @option options [String] :exchange_id fetch tickers from the given exchange id (e.g. 'binance').
60
- # @option options [String] :include_exchange_logo includes the exchange's logo.
52
+ # @option options [String] :exchange_ids filter ticker results from the given exchange ids (e.g. 'binance, bitfinex').
53
+ # @option options [Boolean] :include_exchange_logo flag to show the exchange's logo.
61
54
  # @option options [Integer] :page sets the page for results.
62
55
  # @option options [String] :order ('trust_score_desc') sets the sort order for results. Valid values: trust_score_desc', 'trust_score_asc', 'volume_desc.
63
56
  # @option options [Boolean] :depth (false) displays orderbook depth (2%).
@@ -65,8 +58,8 @@ module CoingeckoRuby
65
58
  # @return [Hash] returns the list of tickers for the given coin.
66
59
  #
67
60
  # @example Fetch Bitcoin's tickers.
68
- # client.get_tickers(id: 'bitcoin)
69
- # @example Response object (truncated)
61
+ # client.tickers('bitcoin')
62
+ # @example Sample response object (truncated)
70
63
  # {
71
64
  # "name" => "Bitcoin",
72
65
  # "tickers" => [{
@@ -99,8 +92,8 @@ module CoingeckoRuby
99
92
  # }],
100
93
  # }
101
94
  # @example Fetch Bitcoin's tickers from Binance with 2% orderbook depth data.
102
- # client.get_tickers(id: 'bitcoin', options: { exchange_id: 'binance', depth: true })
103
- # @example Response object (truncated)
95
+ # client.tickers('bitcoin', exchange_id: 'binance', depth: true)
96
+ # @example Sample response object (truncated)
104
97
  # {
105
98
  # "name" => "Bitcoin",
106
99
  # "tickers" => [{
@@ -134,14 +127,19 @@ module CoingeckoRuby
134
127
  # "target_coin_id" => "tether"
135
128
  # }],
136
129
  # }
130
+ def tickers(id, **options)
131
+ get "coins/#{id}/tickers", options
132
+ end
133
+
134
+ # @deprecated Use {#tickers} instead
137
135
  def get_tickers(id:, options: {})
138
- get "coins/#{id}/tickers", { options: options }
136
+ tickers(id, **options)
139
137
  end
140
138
 
141
139
  # Fetches market data for a coin or a list of coins.
142
140
  #
143
141
  # @param ids [String] the coin id or ids to fetch.
144
- # @param currency [String] the currency to display market price data.
142
+ # @option options [String] :vs_currency the currency to display market price data.
145
143
  # @option options [String] :category filter results by the given coin category.
146
144
  # @option options [String] :order ('market_cap_desc') sets the sort order for results. Valid values: market_cap_desc, gecko_desc, gecko_asc, market_cap_asc, market_cap_desc, volume_asc, volume_desc, id_asc, id_desc.
147
145
  # @option options [Integer] :per_page (100) sets the number of results to return per page.
@@ -152,8 +150,8 @@ module CoingeckoRuby
152
150
  # @return [Array<Hash>] returns market data for the given coin or coins.
153
151
  #
154
152
  # @example Fetch market data for Bitcoin and Ethereum in USD.
155
- # client.get_markets(ids: 'bitcoin, ethereum', currency: 'gbp')
156
- # @example Response object
153
+ # client.markets('bitcoin, ethereum', vs_currency: 'gbp')
154
+ # @example Sample response object
157
155
  # [{
158
156
  # "id" => "bitcoin",
159
157
  # "symbol" => "btc",
@@ -217,10 +215,13 @@ module CoingeckoRuby
217
215
  # "last_updated" => "2021-05-16T07:06:00.946Z"
218
216
  # }
219
217
  # ]
220
- # @example Fetch market data for every CoinGecko-supported coin in USD.
221
- # client.get_markets(currency: 'usd')
218
+ def markets(ids, **options)
219
+ get 'coins/markets', { ids: ids, **options }
220
+ end
221
+
222
+ # @deprecated Use {#markets} instead
222
223
  def get_markets(ids:, currency: 'usd', options: {})
223
- get 'coins/markets', { ids: ids, vs_currency: currency, options: options }
224
+ markets(ids, vs_currency: currency, **options)
224
225
  end
225
226
  end
226
227
  end
@@ -0,0 +1,154 @@
1
+ module CoingeckoRuby
2
+ class Client
3
+ module Derivatives
4
+ # Fetches the list of derivative products listed in CoinGecko.
5
+ #
6
+ # @option options [String] :include_tickers ('unexpired') determines whether to display all tickers or only show unexpired tickers. Valid values: all, unexpired
7
+ #
8
+ # @return [Array<Hash>] each derivative product's information.
9
+ #
10
+ # @example Get all unexpired derivatives.
11
+ # client.derivatives(include_tickers: 'unexpired')
12
+ # @example Sample response object (truncated)
13
+ # [
14
+ # {
15
+ # "market" => "Binance (Futures)",
16
+ # "symbol" => "BTCUSDT",
17
+ # "index_id" => "BTC",
18
+ # "price" => "44575.26",
19
+ # "price_percentage_change_24h" => -0.5892545887194689,
20
+ # "contract_type" => "perpetual",
21
+ # "index" => 44646.70155337,
22
+ # "basis" => -0.11242030301843862,
23
+ # "spread" => 0.01,
24
+ # "funding_rate" => 0.021205,
25
+ # "open_interest" => 1822639548.16,
26
+ # "volume_24h" => 27179643527.25483,
27
+ # "last_traded_at" => 1621341447,
28
+ # "expired_at" => nil
29
+ # },
30
+ # {
31
+ # "market" => "Bybit",
32
+ # "symbol" => "BTCUSD",
33
+ # "index_id" => "BTC",
34
+ # "price" => "44817.5",
35
+ # "price_percentage_change_24h" => -0.9426664309079656,
36
+ # "contract_type" => "perpetual",
37
+ # "index" => 44827.57,
38
+ # "basis" => 0.022468901656718915,
39
+ # "spread" => 0.01,
40
+ # "funding_rate" => 0.01,
41
+ # "open_interest" => 1664013731.0,
42
+ # "volume_24h" => 5725694670.15,
43
+ # "last_traded_at" => 1621340931,
44
+ # "expired_at" => nil
45
+ # },
46
+ # ]
47
+ def derivatives(**options)
48
+ get 'derivatives', options
49
+ end
50
+
51
+ # @deprecated Use {#derivatives} instead
52
+ def get_derivatives(options: {})
53
+ derivatives(**options)
54
+ end
55
+
56
+ # Fetches the list of derivative exchanges listed in CoinGecko.
57
+ #
58
+ # @option options [Integer] :per_page sets the number of results to return per page.
59
+ # @option options [Integer] :page sets the page for results.
60
+ # @option options [String] :order sets the sort order for results. Valid values: name_asc, name_desc, open_interest_btc_asc, open_interest_btc_desc, trade_volume_24h_btc_asc, trade_volume_24h_btc_desc.
61
+ #
62
+ # @return [Array<Hash>] each derivative exchange's information.
63
+ #
64
+ # @example Get one derivative exchange.
65
+ # client.derivative_exchanges(per_page: 1)
66
+ # @example Sample response object
67
+ # [{
68
+ # "name" => "Binance (Futures)",
69
+ # "id" => "binance_futures",
70
+ # "open_interest_btc" => 237845.78,
71
+ # "trade_volume_24h_btc" => "2209372.18",
72
+ # "number_of_perpetual_pairs" => 132,
73
+ # "number_of_futures_pairs" => 32,
74
+ # "image" =>
75
+ # "https://assets.coingecko.com/markets/images/466/small/binance_futures.jpg?1568609512",
76
+ # "year_established" => 2019,
77
+ # "country" => nil,
78
+ # "description" => "",
79
+ # "url" => "https://www.binance.com/"
80
+ # }]
81
+ def derivative_exchanges(**options)
82
+ get 'derivatives/exchanges', options
83
+ end
84
+
85
+ # @deprecated Use {#derivative_exchanges} instead
86
+ def get_derivative_exchanges(options: {})
87
+ derivative_exchanges(**options)
88
+ end
89
+
90
+ # Fetches data for a specific derivative exchange.
91
+ #
92
+ # @param id [String] the id of the derivative exchange.
93
+ #
94
+ # @option options [String] :include_tickers determines whether to display all tickers or only show unexpired tickers. Does not return any ticker data if left blank. Valid values: all, unexpired
95
+ #
96
+ # @return [Hash] the derivative exchange's information.
97
+ #
98
+ # @example Get data for the Binance Futures derivative exchange.
99
+ # client.derivative_exchange('binance_futures')
100
+ # @example Sample response object
101
+ # {
102
+ # "name" => "Binance (Futures)",
103
+ # "open_interest_btc" => 237845.78,
104
+ # "trade_volume_24h_btc" => "2226117.02",
105
+ # "number_of_perpetual_pairs" => 132,
106
+ # "number_of_futures_pairs" => 32,
107
+ # "image" =>
108
+ # "https://assets.coingecko.com/markets/images/466/small/binance_futures.jpg?1568609512",
109
+ # "year_established" => 2019,
110
+ # "country" => nil,
111
+ # "description" => "",
112
+ # "url" => "https://www.binance.com/"
113
+ # }
114
+ def derivative_exchange(id, **options)
115
+ get "derivatives/exchanges/#{id}", options
116
+ end
117
+
118
+ # @deprecated Use {#derivative_exchange} instead
119
+ def get_derivative_exchange(id:, options: {})
120
+ derivative_exchange(id, **options)
121
+ end
122
+
123
+ # Fetches the list ids and names of derivative exchanges listed in CoinGecko.
124
+ #
125
+ # @return [Array<Hash>] each derivative exchange's id and name.
126
+ #
127
+ # @example Get all unexpired derivatives.
128
+ # client.derivative_exchanges_ids_and_names
129
+ # @example Sample response object (truncated)
130
+ # [
131
+ # {
132
+ # "id" => "binance_futures",
133
+ # "name" => "Binance (Futures)"
134
+ # },
135
+ # {
136
+ # "id" => "huobi_dm",
137
+ # "name" => "Huobi Futures"
138
+ # },
139
+ # {
140
+ # "id" => "ftx",
141
+ # "name" => "FTX (Derivatives)"
142
+ # }
143
+ # ]
144
+ def derivative_exchanges_ids_and_names
145
+ get 'derivatives/exchanges/list'
146
+ end
147
+
148
+ # @deprecated Use {#derivative_exchanges_ids_and_names} instead
149
+ def get_derivative_exchanges_ids_and_names
150
+ derivative_exchanges_ids_and_names
151
+ end
152
+ end
153
+ end
154
+ end
@@ -0,0 +1,84 @@
1
+ module CoingeckoRuby
2
+ class Client
3
+ module Events
4
+ # Fetches the list of events listed in CoinGecko.
5
+ # @todo CoinGecko API is not returning any list of events. Investigate why this is happening.
6
+ #
7
+ # @option options [String] :country_code country code to fetch list of events from.
8
+ # @option options [String] :type type of event to fetch.
9
+ # @option options [Integer] :page sets the page for results.
10
+ # @option options [Boolean] :upcoming_events_only (true) determines whether to fetch upcoming events only or all events.
11
+ # @option options [String] :from_date fetch events after the specified date. Date must be in the format of yyyy-mm-dd
12
+ # @option options [String] :to_date fetch events before the specified date. Date must be in the format of yyyy-mm-dd
13
+ #
14
+ # @return [Array<Hash>] each finance platform's name, category, url, facts (description), and centralized status.
15
+ #
16
+ # @example Get all upcoming events.
17
+ # client.events(upcoming_events_only: true)
18
+ def events(**options)
19
+ get 'events', options
20
+ end
21
+
22
+ # @deprecated Use {#events} instead
23
+ def get_events(options: {})
24
+ events(**options)
25
+ end
26
+
27
+ # Fetches the valid list of countries to fetch events from.
28
+ #
29
+ # @return [Hash] each country's name and code and the total country count.
30
+ #
31
+ # @example Get all event countries.
32
+ # client.event_countries
33
+ # @example Sample response object (truncated)
34
+ # {
35
+ # "data" => [{
36
+ # "country" => nil,
37
+ # "code" => ""
38
+ # },
39
+ # {
40
+ # "country" => "Malaysia",
41
+ # "code" => "MY"
42
+ # },
43
+ # {
44
+ # "country" => "Singapore",
45
+ # "code" => "SG"
46
+ # },
47
+ # {
48
+ # "country" => "United States",
49
+ # "code" => "US"
50
+ # }
51
+ # ],
52
+ # "count" => 4
53
+ # }
54
+ def event_countries
55
+ get 'events/countries'
56
+ end
57
+
58
+ # @deprecated Use {#event_countries} instead
59
+ def get_event_countries
60
+ event_countries
61
+ end
62
+
63
+ # Fetches the valid list of events to fetch.
64
+ #
65
+ # @return [Array<Hash>] the list of event types and total event types count.
66
+ #
67
+ # @example Get all event types.
68
+ # client.event_types
69
+ # @example Sample response object
70
+ # {
71
+ # "data" => ["Event", "Conference", "Meetup"],
72
+ # "count" => 3
73
+ # }
74
+ def event_types
75
+ get 'events/types'
76
+ end
77
+
78
+ # @deprecated Use {#event_types} instead
79
+ def get_event_types
80
+ event_types
81
+ end
82
+ end
83
+ end
84
+ end
@@ -8,9 +8,9 @@ module CoingeckoRuby
8
8
  #
9
9
  # @return [Array<Hash>] returns an array of hashes of detailed exchange data.
10
10
  #
11
- # @example Fetch complete exchange data with 2 results per page.
12
- # client.get_exchanges(options: { per_page: 2 })
13
- # @example Response object
11
+ # @example Fetch complete exchange data with 1 result per page.
12
+ # client.exchanges(per_page: 1)
13
+ # @example Sample response object
14
14
  # [{
15
15
  # "id" => "binance",
16
16
  # "name" => "Binance",
@@ -24,22 +24,14 @@ module CoingeckoRuby
24
24
  # "trust_score_rank" => 1,
25
25
  # "trade_volume_24h_btc" => 982949.3975723931,
26
26
  # "trade_volume_24h_btc_normalized" => 982949.3975723931
27
- # }, {
28
- # "id" => "gdax",
29
- # "name" => "Coinbase Pro",
30
- # "year_established" => 2012,
31
- # "country" => "United States",
32
- # "description" => "",
33
- # "url" => "https://www.coinbase.com",
34
- # "image" => "https://assets.coingecko.com/markets/images/23/small/fe290a14-ac8f-4c90-9aed-5e72abf271f0.jpeg?1527171545",
35
- # "has_trading_incentive" => false,
36
- # "trust_score" => 10,
37
- # "trust_score_rank" => 2,
38
- # "trade_volume_24h_btc" => 153732.65763353973,
39
- # "trade_volume_24h_btc_normalized" => 153732.65763353973
40
27
  # }]
28
+ def exchanges(**options)
29
+ get 'exchanges', options
30
+ end
31
+
32
+ # @deprecated Use {#exchanges} instead
41
33
  def get_exchanges(options: {})
42
- get 'exchanges', { options: options }
34
+ exchanges(**options)
43
35
  end
44
36
 
45
37
  # Fetches complete data for a specific exchange.
@@ -49,18 +41,23 @@ module CoingeckoRuby
49
41
  # @return [Hash] returns detailed data for the given exchange.
50
42
  #
51
43
  # @example Fetch complete exchange data for Binance.
52
- # client.get_exchange_data(id: 'binance')
53
- def get_exchange_data(id:)
44
+ # client.exchange('binance')
45
+ def exchange(id)
54
46
  get "exchanges/#{id}"
55
47
  end
56
48
 
49
+ # @deprecated Use {#exchange} instead
50
+ def get_exchange_data(id:)
51
+ exchange(id)
52
+ end
53
+
57
54
  # Fetches exchange ids for every exchange currently supported by the CoinGecko API.
58
55
  #
59
56
  # @return [Array<Hash>] returns an array of hashes of the exchange id and name.
60
57
  #
61
58
  # @example Fetch all exchange ids.
62
- # client.get_exchange_ids
63
- # @example Response object
59
+ # client.exchange_ids
60
+ # @example Sample response object
64
61
  # [{
65
62
  # "id" => "aave",
66
63
  # "name" => "Aave"
@@ -70,1415 +67,20 @@ module CoingeckoRuby
70
67
  # }, {
71
68
  # "id" => "aax_futures",
72
69
  # "name" => "AAX Futures"
73
- # }, {
74
- # "id" => "abcc",
75
- # "name" => "ABCC"
76
- # }, {
77
- # "id" => "abit",
78
- # "name" => "Abit"
79
- # }, {
80
- # "id" => "acdx",
81
- # "name" => "ACDX"
82
- # }, {
83
- # "id" => "acdx_futures",
84
- # "name" => "ACDX Futures"
85
- # }, {
86
- # "id" => "aex",
87
- # "name" => "AEX"
88
- # }, {
89
- # "id" => "allbit",
90
- # "name" => "Allbit"
91
- # }, {
92
- # "id" => "allcoin",
93
- # "name" => "Allcoin"
94
- # }, {
95
- # "id" => "alpha_five",
96
- # "name" => "Alpha5"
97
- # }, {
98
- # "id" => "altcointrader",
99
- # "name" => "AltcoinTrader"
100
- # }, {
101
- # "id" => "alterdice",
102
- # "name" => "AlterDice"
103
- # }, {
104
- # "id" => "altilly",
105
- # "name" => "Altilly"
106
- # }, {
107
- # "id" => "altmarkets",
108
- # "name" => "Altmarkets"
109
- # }, {
110
- # "id" => "anyswap",
111
- # "name" => "Anyswap"
112
- # }, {
113
- # "id" => "apeswap",
114
- # "name" => "ApeSwap"
115
- # }, {
116
- # "id" => "aprobit",
117
- # "name" => "Aprobit"
118
- # }, {
119
- # "id" => "artisturba",
120
- # "name" => "Artis Turba"
121
- # }, {
122
- # "id" => "atomars",
123
- # "name" => "Atomars"
124
- # }, {
125
- # "id" => "b2bx",
126
- # "name" => "B2BX"
127
- # }, {
128
- # "id" => "bakeryswap",
129
- # "name" => "Bakeryswap"
130
- # }, {
131
- # "id" => "bakkt",
132
- # "name" => "Bakkt"
133
- # }, {
134
- # "id" => "balancer",
135
- # "name" => "Balancer (v2)"
136
- # }, {
137
- # "id" => "balancer_v1",
138
- # "name" => "Balancer (v1)"
139
- # }, {
140
- # "id" => "bamboo_relay",
141
- # "name" => "Bamboo Relay"
142
- # }, {
143
- # "id" => "bancor",
144
- # "name" => "Bancor Network"
145
- # }, {
146
- # "id" => "bankera",
147
- # "name" => "Bankera"
148
- # }, {
149
- # "id" => "basefex",
150
- # "name" => "BaseFEX"
151
- # }, {
152
- # "id" => "bcex",
153
- # "name" => "BCEX"
154
- # }, {
155
- # "id" => "beaxy",
156
- # "name" => "Beaxy"
157
- # }, {
158
- # "id" => "bepswap",
159
- # "name" => "BepSwap"
160
- # }, {
161
- # "id" => "bgogo",
162
- # "name" => "Bgogo"
163
- # }, {
164
- # "id" => "bibo",
165
- # "name" => "Bibo"
166
- # }, {
167
- # "id" => "bibox",
168
- # "name" => "Bibox"
169
- # }, {
170
- # "id" => "bibox_futures",
171
- # "name" => "Bibox (Futures)"
172
- # }, {
173
- # "id" => "biconomy",
174
- # "name" => "Biconomy"
175
- # }, {
176
- # "id" => "bidesk",
177
- # "name" => "Bidesk"
178
- # }, {
179
- # "id" => "bigone",
180
- # "name" => "BigONE"
181
- # }, {
182
- # "id" => "bigone_futures",
183
- # "name" => "BigONE Futures"
184
- # }, {
185
- # "id" => "biki",
186
- # "name" => "BiKi"
187
- # }, {
188
- # "id" => "biki_futures",
189
- # "name" => "Biki (Futures)"
190
- # }, {
191
- # "id" => "bilaxy",
192
- # "name" => "Bilaxy"
193
- # }, {
194
- # "id" => "binance",
195
- # "name" => "Binance"
196
- # }, {
197
- # "id" => "binance_dex",
198
- # "name" => "Binance DEX"
199
- # }, {
200
- # "id" => "binance_dex_mini",
201
- # "name" => "Binance DEX (Mini)"
202
- # }, {
203
- # "id" => "binance_futures",
204
- # "name" => "Binance (Futures)"
205
- # }, {
206
- # "id" => "binance_jersey",
207
- # "name" => "Binance Jersey"
208
- # }, {
209
- # "id" => "binance_us",
210
- # "name" => "Binance US"
211
- # }, {
212
- # "id" => "bione",
213
- # "name" => "BiONE"
214
- # }, {
215
- # "id" => "birake",
216
- # "name" => "Birake"
217
- # }, {
218
- # "id" => "bisq",
219
- # "name" => "Bisq"
220
- # }, {
221
- # "id" => "bit2c",
222
- # "name" => "Bit2c"
223
- # }, {
224
- # "id" => "bitalong",
225
- # "name" => "Bitalong"
226
- # }, {
227
- # "id" => "bitbank",
228
- # "name" => "Bitbank"
229
- # }, {
230
- # "id" => "bitbay",
231
- # "name" => "BitBay"
232
- # }, {
233
- # "id" => "bitbns",
234
- # "name" => "BitBNS"
235
- # }, {
236
- # "id" => "bitbox",
237
- # "name" => "BITFRONT"
238
- # }, {
239
- # "id" => "bitci",
240
- # "name" => "Bitci"
241
- # }, {
242
- # "id" => "bitcoin_com",
243
- # "name" => "Bitcoin.com Exchange"
244
- # }, {
245
- # "id" => "bit_com_futures",
246
- # "name" => "Bit.com"
247
- # }, {
248
- # "id" => "bitcratic",
249
- # "name" => "Bitcratic"
250
- # }, {
251
- # "id" => "bitex",
252
- # "name" => "Bitex.la"
253
- # }, {
254
- # "id" => "bitexbook",
255
- # "name" => "BITEXBOOK"
256
- # }, {
257
- # "id" => "bitexlive",
258
- # "name" => "Bitexlive"
259
- # }, {
260
- # "id" => "bitfex",
261
- # "name" => "Bitfex"
262
- # }, {
263
- # "id" => "bitfinex",
264
- # "name" => "Bitfinex"
265
- # }, {
266
- # "id" => "bitfinex_futures",
267
- # "name" => "Bitfinex (Futures)"
268
- # }, {
269
- # "id" => "bitflyer",
270
- # "name" => "bitFlyer"
271
- # }, {
272
- # "id" => "bitflyer_futures",
273
- # "name" => "Bitflyer (Futures)"
274
- # }, {
275
- # "id" => "bitforex",
276
- # "name" => "Bitforex"
277
- # }, {
278
- # "id" => "bitforex_futures",
279
- # "name" => "Bitforex (Futures)"
280
- # }, {
281
- # "id" => "bitget",
282
- # "name" => "Bitget"
283
- # }, {
284
- # "id" => "bitget_futures",
285
- # "name" => "Bitget Futures"
286
- # }, {
287
- # "id" => "bithash",
288
- # "name" => "BitHash"
289
- # }, {
290
- # "id" => "bitholic",
291
- # "name" => "Bithumb Singapore"
292
- # }, {
293
- # "id" => "bithumb",
294
- # "name" => "Bithumb"
295
- # }, {
296
- # "id" => "bithumb_futures",
297
- # "name" => "Bithumb (Futures)"
298
- # }, {
299
- # "id" => "bithumb_global",
300
- # "name" => "Bithumb Global"
301
- # }, {
302
- # "id" => "bitinfi",
303
- # "name" => "Bitinfi"
304
- # }, {
305
- # "id" => "bitkonan",
306
- # "name" => "BitKonan"
307
- # }, {
308
- # "id" => "bitkub",
309
- # "name" => "Bitkub"
310
- # }, {
311
- # "id" => "bitmart",
312
- # "name" => "BitMart"
313
- # }, {
314
- # "id" => "bitmax",
315
- # "name" => "AscendEX (BitMax)"
316
- # }, {
317
- # "id" => "bitmax_futures",
318
- # "name" => "AscendEX (BitMax) (Futures)"
319
- # }, {
320
- # "id" => "bitmesh",
321
- # "name" => "Bitmesh"
322
- # }, {
323
- # "id" => "bitmex",
324
- # "name" => "BitMEX"
325
- # }, {
326
- # "id" => "bitoffer",
327
- # "name" => "Bitoffer"
328
- # }, {
329
- # "id" => "bitonbay",
330
- # "name" => "BitOnBay"
331
- # }, {
332
- # "id" => "bitopro",
333
- # "name" => "BitoPro"
334
- # }, {
335
- # "id" => "bitpanda",
336
- # "name" => "Bitpanda Pro"
337
- # }, {
338
- # "id" => "bitrabbit",
339
- # "name" => "BitRabbit"
340
- # }, {
341
- # "id" => "bitrue",
342
- # "name" => "Bitrue"
343
- # }, {
344
- # "id" => "bits_blockchain",
345
- # "name" => "Bits Blockchain"
346
- # }, {
347
- # "id" => "bitsdaq",
348
- # "name" => "Bitsdaq"
349
- # }, {
350
- # "id" => "bitso",
351
- # "name" => "Bitso"
352
- # }, {
353
- # "id" => "bitsonic",
354
- # "name" => "Bitsonic"
355
- # }, {
356
- # "id" => "bitstamp",
357
- # "name" => "Bitstamp"
358
- # }, {
359
- # "id" => "bitsten",
360
- # "name" => "Bitsten"
361
- # }, {
362
- # "id" => "bitstorage",
363
- # "name" => "BitStorage"
364
- # }, {
365
- # "id" => "bittrex",
366
- # "name" => "Bittrex"
367
- # }, {
368
- # "id" => "bitubu",
369
- # "name" => "Bitubu Exchange"
370
- # }, {
371
- # "id" => "bit_z",
372
- # "name" => "BitZ"
373
- # }, {
374
- # "id" => "bitz_futures",
375
- # "name" => "BitZ (Futures)"
376
- # }, {
377
- # "id" => "bkex",
378
- # "name" => "BKEX"
379
- # }, {
380
- # "id" => "bleutrade",
381
- # "name" => "bleutrade"
382
- # }, {
383
- # "id" => "blockchain_com",
384
- # "name" => "Blockchain.com"
385
- # }, {
386
- # "id" => "blockonix",
387
- # "name" => "Blockonix"
388
- # }, {
389
- # "id" => "boa",
390
- # "name" => "BOA Exchange"
391
- # }, {
392
- # "id" => "braziliex",
393
- # "name" => "Braziliex"
394
- # }, {
395
- # "id" => "bscswap",
396
- # "name" => "BSCswap"
397
- # }, {
398
- # "id" => "btc_alpha",
399
- # "name" => "BTC-Alpha"
400
- # }, {
401
- # "id" => "btcbox",
402
- # "name" => "BTCBOX"
403
- # }, {
404
- # "id" => "btcc",
405
- # "name" => "BTCC"
406
- # }, {
407
- # "id" => "btc_exchange",
408
- # "name" => "Btc Exchange"
409
- # }, {
410
- # "id" => "btcmarkets",
411
- # "name" => "BTCMarkets"
412
- # }, {
413
- # "id" => "btcmex",
414
- # "name" => "BTCMEX"
415
- # }, {
416
- # "id" => "btcnext",
417
- # "name" => "BTCNEXT"
418
- # }, {
419
- # "id" => "btcsquare",
420
- # "name" => "BTCSquare"
421
- # }, {
422
- # "id" => "btc_trade_ua",
423
- # "name" => "BTC Trade UA"
424
- # }, {
425
- # "id" => "btcturk",
426
- # "name" => "BtcTurk PRO"
427
- # }, {
428
- # "id" => "btse",
429
- # "name" => "BTSE"
430
- # }, {
431
- # "id" => "btse_futures",
432
- # "name" => "BTSE (Futures)"
433
- # }, {
434
- # "id" => "burgerswap",
435
- # "name" => "BurgerSwap"
436
- # }, {
437
- # "id" => "buyucoin",
438
- # "name" => "BuyUcoin"
439
- # }, {
440
- # "id" => "bvnex",
441
- # "name" => "Bvnex"
442
- # }, {
443
- # "id" => "bw",
444
- # "name" => "BW.com"
445
- # }, {
446
- # "id" => "bybit",
447
- # "name" => "Bybit"
448
- # }, {
449
- # "id" => "c2cx",
450
- # "name" => "C2CX"
451
- # }, {
452
- # "id" => "catex",
453
- # "name" => "Catex"
454
- # }, {
455
- # "id" => "cbx",
456
- # "name" => "CBX"
457
- # }, {
458
- # "id" => "ccex",
459
- # "name" => "C-CEX"
460
- # }, {
461
- # "id" => "cex",
462
- # "name" => "CEX.IO"
463
- # }, {
464
- # "id" => "chainex",
465
- # "name" => "ChainEX"
466
- # }, {
467
- # "id" => "changelly",
468
- # "name" => "Changelly PRO"
469
- # }, {
470
- # "id" => "chiliz",
471
- # "name" => "Chiliz"
472
- # }, {
473
- # "id" => "citex",
474
- # "name" => "CITEX"
475
- # }, {
476
- # "id" => "cme_futures",
477
- # "name" => "CME Bitcoin Futures"
478
- # }, {
479
- # "id" => "coinasset",
480
- # "name" => "CoinAsset"
481
- # }, {
482
- # "id" => "coinbene",
483
- # "name" => "CoinBene"
484
- # }, {
485
- # "id" => "coinbig",
486
- # "name" => "COINBIG"
487
- # }, {
488
- # "id" => "coinbit",
489
- # "name" => "Coinbit"
490
- # }, {
491
- # "id" => "coincheck",
492
- # "name" => "Coincheck"
493
- # }, {
494
- # "id" => "coindcx",
495
- # "name" => "CoinDCX"
496
- # }, {
497
- # "id" => "coindeal",
498
- # "name" => "Coindeal"
499
- # }, {
500
- # "id" => "coindirect",
501
- # "name" => "CoinDirect"
502
- # }, {
503
- # "id" => "coineal",
504
- # "name" => "Coineal"
505
- # }, {
506
- # "id" => "coin_egg",
507
- # "name" => "CoinEgg"
508
- # }, {
509
- # "id" => "coinex",
510
- # "name" => "CoinEx"
511
- # }, {
512
- # "id" => "coinfalcon",
513
- # "name" => "Coinfalcon"
514
- # }, {
515
- # "id" => "coinfield",
516
- # "name" => "Coinfield"
517
- # }, {
518
- # "id" => "coinflex",
519
- # "name" => "CoinFLEX"
520
- # }, {
521
- # "id" => "coinflex_futures",
522
- # "name" => "CoinFLEX (Futures)"
523
- # }, {
524
- # "id" => "coinfloor",
525
- # "name" => "Coinfloor"
526
- # }, {
527
- # "id" => "coingi",
528
- # "name" => "Coingi"
529
- # }, {
530
- # "id" => "coinhe",
531
- # "name" => "CoinHe"
532
- # }, {
533
- # "id" => "coinhub",
534
- # "name" => "Coinhub"
535
- # }, {
536
- # "id" => "coinjar",
537
- # "name" => "CoinJar Exchange"
538
- # }, {
539
- # "id" => "coinlim",
540
- # "name" => "Coinlim"
541
- # }, {
542
- # "id" => "coinlist",
543
- # "name" => "Coinlist"
544
- # }, {
545
- # "id" => "coinmargin",
546
- # "name" => "CoinMargin"
547
- # }, {
548
- # "id" => "coin_metro",
549
- # "name" => "CoinMetro"
550
- # }, {
551
- # "id" => "coinone",
552
- # "name" => "Coinone"
553
- # }, {
554
- # "id" => "coinpark",
555
- # "name" => "Coinpark"
556
- # }, {
557
- # "id" => "coinplace",
558
- # "name" => "Coinplace"
559
- # }, {
560
- # "id" => "coinsbank",
561
- # "name" => "Coinsbank"
562
- # }, {
563
- # "id" => "coinsbit",
564
- # "name" => "Coinsbit"
565
- # }, {
566
- # "id" => "coinsuper",
567
- # "name" => "Coinsuper"
568
- # }, {
569
- # "id" => "cointiger",
570
- # "name" => "CoinTiger"
571
- # }, {
572
- # "id" => "cointiger_futures",
573
- # "name" => "CoinTiger (Futures)"
574
- # }, {
575
- # "id" => "coinxpro",
576
- # "name" => "COINX.PRO"
577
- # }, {
578
- # "id" => "coinzo",
579
- # "name" => "Coinzo"
580
- # }, {
581
- # "id" => "coinzoom",
582
- # "name" => "Coinzoom"
583
- # }, {
584
- # "id" => "comethswap",
585
- # "name" => "ComethSwap"
586
- # }, {
587
- # "id" => "compound_finance",
588
- # "name" => "Compound Finance"
589
- # }, {
590
- # "id" => "c_patex",
591
- # "name" => "C-Patex"
592
- # }, {
593
- # "id" => "cpdax",
594
- # "name" => "CPDAX"
595
- # }, {
596
- # "id" => "crex24",
597
- # "name" => "CREX24"
598
- # }, {
599
- # "id" => "crxzone",
600
- # "name" => "CRXzone"
601
- # }, {
602
- # "id" => "cryptaldash",
603
- # "name" => "CryptalDash"
604
- # }, {
605
- # "id" => "cryptex",
606
- # "name" => "Cryptex"
607
- # }, {
608
- # "id" => "cryptlocex",
609
- # "name" => "Cryptlocex"
610
- # }, {
611
- # "id" => "crypto_com",
612
- # "name" => "Crypto.com"
613
- # }, {
614
- # "id" => "crypto_com_futures",
615
- # "name" => "Crypto.com (Futures)"
616
- # }, {
617
- # "id" => "cryptology",
618
- # "name" => "Cryptology"
619
- # }, {
620
- # "id" => "crytrex",
621
- # "name" => "CryTrEx"
622
- # }, {
623
- # "id" => "c_trade",
624
- # "name" => "C-Trade"
625
- # }, {
626
- # "id" => "currency",
627
- # "name" => "Currency.com"
628
- # }, {
629
- # "id" => "curve",
630
- # "name" => "Curve Finance"
631
- # }, {
632
- # "id" => "cybex",
633
- # "name" => "Cybex DEX"
634
- # }, {
635
- # "id" => "daofi",
636
- # "name" => "DAOfi"
637
- # }, {
638
- # "id" => "darb_finance",
639
- # "name" => "Darb Finance"
640
- # }, {
641
- # "id" => "daybit",
642
- # "name" => "Daybit"
643
- # }, {
644
- # "id" => "dcoin",
645
- # "name" => "Dcoin"
646
- # }, {
647
- # "id" => "ddex",
648
- # "name" => "DDEX"
649
- # }, {
650
- # "id" => "decoin",
651
- # "name" => "Decoin"
652
- # }, {
653
- # "id" => "defi_swap",
654
- # "name" => "DeFi Swap"
655
- # }, {
656
- # "id" => "delta_futures",
657
- # "name" => "Delta Exchange (Futures)"
658
- # }, {
659
- # "id" => "delta_spot",
660
- # "name" => "Delta Exchange"
661
- # }, {
662
- # "id" => "dem_exchange",
663
- # "name" => "Demex"
664
- # }, {
665
- # "id" => "deribit",
666
- # "name" => "Deribit"
667
- # }, {
668
- # "id" => "deversifi",
669
- # "name" => "Deversifi "
670
- # }, {
671
- # "id" => "dex_blue",
672
- # "name" => "dex.blue"
673
- # }, {
674
- # "id" => "dextrade",
675
- # "name" => "Dex-Trade"
676
- # }, {
677
- # "id" => "digifinex",
678
- # "name" => "Digifinex"
679
- # }, {
680
- # "id" => "dmm",
681
- # "name" => "DMM"
682
- # }, {
683
- # "id" => "dobitrade",
684
- # "name" => "Dobitrade"
685
- # }, {
686
- # "id" => "dodo",
687
- # "name" => "DODO"
688
- # }, {
689
- # "id" => "dodo_bsc",
690
- # "name" => "Dodo BSC"
691
- # }, {
692
- # "id" => "dolomite",
693
- # "name" => "Dolomite"
694
- # }, {
695
- # "id" => "dove_wallet",
696
- # "name" => "Dove Wallet"
697
- # }, {
698
- # "id" => "dragonex",
699
- # "name" => "DragonEx"
700
- # }, {
701
- # "id" => "dsx",
702
- # "name" => "DSX Global"
703
- # }, {
704
- # "id" => "duedex",
705
- # "name" => "DueDEX"
706
- # }, {
707
- # "id" => "dydx",
708
- # "name" => "dYdX"
709
- # }, {
710
- # "id" => "dydx_perpetual",
711
- # "name" => "dYdX Perpetual"
712
- # }, {
713
- # "id" => "dydx_perpetual_l1",
714
- # "name" => "dYdX Perpetual (L1)"
715
- # }, {
716
- # "id" => "ecxx",
717
- # "name" => "Ecxx"
718
- # }, {
719
- # "id" => "elitex",
720
- # "name" => "Elitex"
721
- # }, {
722
- # "id" => "emirex",
723
- # "name" => "Emirex"
724
- # }, {
725
- # "id" => "equos",
726
- # "name" => "Equos.io"
727
- # }, {
728
- # "id" => "equos_perpetual",
729
- # "name" => "Equos.io (Perpetual)"
730
- # }, {
731
- # "id" => "eterbase",
732
- # "name" => "Eterbase"
733
- # }, {
734
- # "id" => "etherflyer",
735
- # "name" => "EtherFlyer"
736
- # }, {
737
- # "id" => "ethex",
738
- # "name" => "Ethex"
739
- # }, {
740
- # "id" => "etorox",
741
- # "name" => "eToroX"
742
- # }, {
743
- # "id" => "everbloom",
744
- # "name" => "Everbloom"
745
- # }, {
746
- # "id" => "exmarkets",
747
- # "name" => "ExMarkets"
748
- # }, {
749
- # "id" => "exmo",
750
- # "name" => "EXMO"
751
- # }, {
752
- # "id" => "exnce",
753
- # "name" => "EXNCE"
754
- # }, {
755
- # "id" => "exrates",
756
- # "name" => "Exrates"
757
- # }, {
758
- # "id" => "exx",
759
- # "name" => "EXX"
760
- # }, {
761
- # "id" => "fatbtc",
762
- # "name" => "FatBTC"
763
- # }, {
764
- # "id" => "fex",
765
- # "name" => "FEX"
766
- # }, {
767
- # "id" => "financex",
768
- # "name" => "FinanceX"
769
- # }, {
770
- # "id" => "finexbox",
771
- # "name" => "FinexBox"
772
- # }, {
773
- # "id" => "floatsv",
774
- # "name" => "Float SV"
775
- # }, {
776
- # "id" => "flybit",
777
- # "name" => "Flybit"
778
- # }, {
779
- # "id" => "forkdelta",
780
- # "name" => "ForkDelta"
781
- # }, {
782
- # "id" => "freiexchange",
783
- # "name" => "Freiexchange"
784
- # }, {
785
- # "id" => "ftx",
786
- # "name" => "FTX (Derivatives)"
787
- # }, {
788
- # "id" => "ftx_spot",
789
- # "name" => "FTX"
790
- # }, {
791
- # "id" => "ftx_us",
792
- # "name" => "FTX.US"
793
- # }, {
794
- # "id" => "futureswap",
795
- # "name" => "Futureswap"
796
- # }, {
797
- # "id" => "gate",
798
- # "name" => "Gate.io"
799
- # }, {
800
- # "id" => "gate_futures",
801
- # "name" => "Gate.io (Futures)"
802
- # }, {
803
- # "id" => "gbx",
804
- # "name" => "Global Blockchain Exchange"
805
- # }, {
806
- # "id" => "gdac",
807
- # "name" => "GDAC"
808
- # }, {
809
- # "id" => "gdax",
810
- # "name" => "Coinbase Pro"
811
- # }, {
812
- # "id" => "gemini",
813
- # "name" => "Gemini"
814
- # }, {
815
- # "id" => "getbtc",
816
- # "name" => "GetBTC"
817
- # }, {
818
- # "id" => "gmo_japan",
819
- # "name" => "GMO Japan"
820
- # }, {
821
- # "id" => "gmo_japan_futures",
822
- # "name" => "GMO Japan (Futures)"
823
- # }, {
824
- # "id" => "gobaba",
825
- # "name" => "Gobaba"
826
- # }, {
827
- # "id" => "goku",
828
- # "name" => "GokuMarket"
829
- # }, {
830
- # "id" => "gopax",
831
- # "name" => "GoPax"
832
- # }, {
833
- # "id" => "graviex",
834
- # "name" => "Graviex"
835
- # }, {
836
- # "id" => "hanbitco",
837
- # "name" => "Hanbitco"
838
- # }, {
839
- # "id" => "hbtc",
840
- # "name" => "BHEX"
841
- # }, {
842
- # "id" => "hbtc_futures",
843
- # "name" => "HBTC (Futures)"
844
- # }, {
845
- # "id" => "hb_top",
846
- # "name" => "Hb.top"
847
- # }, {
848
- # "id" => "hitbtc",
849
- # "name" => "HitBTC"
850
- # }, {
851
- # "id" => "honeyswap",
852
- # "name" => "Honeyswap"
853
- # }, {
854
- # "id" => "hoo",
855
- # "name" => "Hoo.com"
856
- # }, {
857
- # "id" => "hopex",
858
- # "name" => "Hopex"
859
- # }, {
860
- # "id" => "hotbit",
861
- # "name" => "Hotbit"
862
- # }, {
863
- # "id" => "hpx",
864
- # "name" => "HPX"
865
- # }, {
866
- # "id" => "hubi",
867
- # "name" => "Hubi"
868
- # }, {
869
- # "id" => "huobi",
870
- # "name" => "Huobi Global"
871
- # }, {
872
- # "id" => "huobi_dm",
873
- # "name" => "Huobi Futures"
874
- # }, {
875
- # "id" => "huobi_id",
876
- # "name" => "Huobi Indonesia"
877
- # }, {
878
- # "id" => "huobi_japan",
879
- # "name" => "Huobi Japan"
880
- # }, {
881
- # "id" => "huobi_korea",
882
- # "name" => "Huobi Korea"
883
- # }, {
884
- # "id" => "huobi_thailand",
885
- # "name" => "Huobi Thailand"
886
- # }, {
887
- # "id" => "ice3x",
888
- # "name" => "Ice3x"
889
- # }, {
890
- # "id" => "idcm",
891
- # "name" => "IDCM"
892
- # }, {
893
- # "id" => "idex",
894
- # "name" => "Idex"
895
- # }, {
896
- # "id" => "incorex",
897
- # "name" => "IncoreX"
898
- # }, {
899
- # "id" => "independent_reserve",
900
- # "name" => "Independent Reserve"
901
- # }, {
902
- # "id" => "indodax",
903
- # "name" => "Indodax"
904
- # }, {
905
- # "id" => "infinity_coin",
906
- # "name" => "Infinity Coin"
907
- # }, {
908
- # "id" => "instantbitex",
909
- # "name" => "Instant Bitex"
910
- # }, {
911
- # "id" => "iqfinex",
912
- # "name" => "IQFinex"
913
- # }, {
914
- # "id" => "itbit",
915
- # "name" => "itBit"
916
- # }, {
917
- # "id" => "jex",
918
- # "name" => "Binance JEX"
919
- # }, {
920
- # "id" => "jex_futures",
921
- # "name" => "Binance JEX (Futures)"
922
- # }, {
923
- # "id" => "joyso",
924
- # "name" => "Joyso"
925
- # }, {
926
- # "id" => "julswap",
927
- # "name" => "Julswap"
928
- # }, {
929
- # "id" => "justswap",
930
- # "name" => "JustSwap"
931
- # }, {
932
- # "id" => "kickex",
933
- # "name" => "KickEX"
934
- # }, {
935
- # "id" => "kkcoin",
936
- # "name" => "KKCoin"
937
- # }, {
938
- # "id" => "k_kex",
939
- # "name" => "KKEX"
940
- # }, {
941
- # "id" => "korbit",
942
- # "name" => "Korbit"
943
- # }, {
944
- # "id" => "kraken",
945
- # "name" => "Kraken"
946
- # }, {
947
- # "id" => "kraken_futures",
948
- # "name" => "Kraken (Futures)"
949
- # }, {
950
- # "id" => "kucoin",
951
- # "name" => "KuCoin"
952
- # }, {
953
- # "id" => "kumex",
954
- # "name" => "KuCoin Futures"
955
- # }, {
956
- # "id" => "kuna",
957
- # "name" => "Kuna Exchange"
958
- # }, {
959
- # "id" => "kyber_network",
960
- # "name" => "Kyber Network"
961
- # }, {
962
- # "id" => "lakebtc",
963
- # "name" => "LakeBTC"
964
- # }, {
965
- # "id" => "latoken",
966
- # "name" => "LATOKEN"
967
- # }, {
968
- # "id" => "lbank",
969
- # "name" => "LBank"
970
- # }, {
971
- # "id" => "lcx",
972
- # "name" => "LCX Exchange"
973
- # }, {
974
- # "id" => "leverj",
975
- # "name" => "Leverj"
976
- # }, {
977
- # "id" => "linkswap",
978
- # "name" => "Linkswap"
979
- # }, {
980
- # "id" => "liquid_derivatives",
981
- # "name" => "Liquid Perpetuals"
982
- # }, {
983
- # "id" => "localtrade",
984
- # "name" => "LocalTrade"
985
- # }, {
986
- # "id" => "loopring",
987
- # "name" => "Loopring"
988
- # }, {
989
- # "id" => "loopring_amm",
990
- # "name" => "Loopring AMM"
991
- # }, {
992
- # "id" => "luaswap",
993
- # "name" => "Luaswap"
994
- # }, {
995
- # "id" => "lucent",
996
- # "name" => "Lucent"
997
- # }, {
998
- # "id" => "lukki",
999
- # "name" => "Lukki"
1000
- # }, {
1001
- # "id" => "luno",
1002
- # "name" => "Luno"
1003
- # }, {
1004
- # "id" => "lykke",
1005
- # "name" => "Lykke"
1006
- # }, {
1007
- # "id" => "max_maicoin",
1008
- # "name" => "Max Maicoin"
1009
- # }, {
1010
- # "id" => "mcdex",
1011
- # "name" => "MCDEX"
1012
- # }, {
1013
- # "id" => "mdex",
1014
- # "name" => "Mdex"
1015
- # }, {
1016
- # "id" => "mercado_bitcoin",
1017
- # "name" => "Mercado Bitcoin"
1018
- # }, {
1019
- # "id" => "mercatox",
1020
- # "name" => "Mercatox"
1021
- # }, {
1022
- # "id" => "mercuriex",
1023
- # "name" => "MercuriEx"
1024
- # }, {
1025
- # "id" => "mesa",
1026
- # "name" => " Gnosis Protocol"
1027
- # }, {
1028
- # "id" => "mirror",
1029
- # "name" => "Terraswap"
1030
- # }, {
1031
- # "id" => "mooniswap",
1032
- # "name" => "Mooniswap"
1033
- # }, {
1034
- # "id" => "multi",
1035
- # "name" => "Multi.io"
1036
- # }, {
1037
- # "id" => "mxc",
1038
- # "name" => "MXC"
1039
- # }, {
1040
- # "id" => "mxc_futures",
1041
- # "name" => "MXC (Futures)"
1042
- # }, {
1043
- # "id" => "mycoinstory",
1044
- # "name" => "MyCoinStory"
1045
- # }, {
1046
- # "id" => "namebase",
1047
- # "name" => "Namebase"
1048
- # }, {
1049
- # "id" => "nami_exchange",
1050
- # "name" => "Nami.Exchange"
1051
- # }, {
1052
- # "id" => "nanu_exchange",
1053
- # "name" => "Nanu Exchange"
1054
- # }, {
1055
- # "id" => "narkasa",
1056
- # "name" => "Narkasa"
1057
- # }, {
1058
- # "id" => "nash",
1059
- # "name" => "Nash"
1060
- # }, {
1061
- # "id" => "neblidex",
1062
- # "name" => "Neblidex"
1063
- # }, {
1064
- # "id" => "negociecoins",
1065
- # "name" => "Negociecoins"
1066
- # }, {
1067
- # "id" => "neraex",
1068
- # "name" => "Neraex"
1069
- # }, {
1070
- # "id" => "newdex",
1071
- # "name" => "Newdex"
1072
- # }, {
1073
- # "id" => "nexus_mutual",
1074
- # "name" => "Nexus Mutual"
1075
- # }, {
1076
- # "id" => "nice_hash",
1077
- # "name" => "NiceHash"
1078
- # }, {
1079
- # "id" => "niftex",
1080
- # "name" => "Niftex"
1081
- # }, {
1082
- # "id" => "nlexch",
1083
- # "name" => "NLexch"
1084
- # }, {
1085
- # "id" => "nominex",
1086
- # "name" => "Nominex"
1087
- # }, {
1088
- # "id" => "novadax",
1089
- # "name" => "NovaDAX"
1090
- # }, {
1091
- # "id" => "oasis_trade",
1092
- # "name" => "OasisDEX"
1093
- # }, {
1094
- # "id" => "oceanex",
1095
- # "name" => "Oceanex"
1096
- # }, {
1097
- # "id" => "okcoin",
1098
- # "name" => "Okcoin"
1099
- # }, {
1100
- # "id" => "okex",
1101
- # "name" => "OKEx"
1102
- # }, {
1103
- # "id" => "okex_swap",
1104
- # "name" => "OKEx (Futures)"
1105
- # }, {
1106
- # "id" => "omgfin",
1107
- # "name" => "Omgfin"
1108
- # }, {
1109
- # "id" => "omnitrade",
1110
- # "name" => "OmniTrade"
1111
- # }, {
1112
- # "id" => "one_inch",
1113
- # "name" => "1inch"
1114
- # }, {
1115
- # "id" => "one_inch_liquidity_protocol",
1116
- # "name" => "1inch Liquidity Protocol"
1117
- # }, {
1118
- # "id" => "one_inch_liquidity_protocol_bsc",
1119
- # "name" => "1inch Liquidity Protocol (BSC)"
1120
- # }, {
1121
- # "id" => "orderbook",
1122
- # "name" => "Orderbook.io"
1123
- # }, {
1124
- # "id" => "otcbtc",
1125
- # "name" => "OTCBTC"
1126
- # }, {
1127
- # "id" => "ovex",
1128
- # "name" => "Ovex"
1129
- # }, {
1130
- # "id" => "p2pb2b",
1131
- # "name" => "P2PB2B"
1132
- # }, {
1133
- # "id" => "pancakeswap",
1134
- # "name" => "PancakeSwap (v2)"
1135
- # }, {
1136
- # "id" => "pancakeswap_others",
1137
- # "name" => "Pancakeswap (Others)"
1138
- # }, {
1139
- # "id" => "pancakeswap_v1",
1140
- # "name" => "PancakeSwap (v1)"
1141
- # }, {
1142
- # "id" => "pangolin",
1143
- # "name" => "Pangolin"
1144
- # }, {
1145
- # "id" => "paraswap",
1146
- # "name" => "Paraswap"
1147
- # }, {
1148
- # "id" => "paribu",
1149
- # "name" => "Paribu"
1150
- # }, {
1151
- # "id" => "paroexchange",
1152
- # "name" => "Paro Exchange"
1153
- # }, {
1154
- # "id" => "paymium",
1155
- # "name" => "Paymium"
1156
- # }, {
1157
- # "id" => "perpetual_protocol",
1158
- # "name" => "Perpetual Protocol"
1159
- # }, {
1160
- # "id" => "phemex",
1161
- # "name" => "Phemex"
1162
- # }, {
1163
- # "id" => "phemex_futures",
1164
- # "name" => "Phemex (Futures)"
1165
- # }, {
1166
- # "id" => "poloniex",
1167
- # "name" => "Poloniex"
1168
- # }, {
1169
- # "id" => "poloniex_futures",
1170
- # "name" => "Poloniex Futures"
1171
- # }, {
1172
- # "id" => "polyient_dex",
1173
- # "name" => "Polyient Dex"
1174
- # }, {
1175
- # "id" => "prime_xbt",
1176
- # "name" => "Prime XBT"
1177
- # }, {
1178
- # "id" => "probit",
1179
- # "name" => "ProBit"
1180
- # }, {
1181
- # "id" => "qtrade",
1182
- # "name" => "qTrade"
1183
- # }, {
1184
- # "id" => "quickswap",
1185
- # "name" => "Quickswap"
1186
- # }, {
1187
- # "id" => "quoine",
1188
- # "name" => "Liquid"
1189
- # }, {
1190
- # "id" => "radar_relay",
1191
- # "name" => "Radar Relay"
1192
- # }, {
1193
- # "id" => "raydium",
1194
- # "name" => "Raydium"
1195
- # }, {
1196
- # "id" => "resfinex",
1197
- # "name" => "Resfinex"
1198
- # }, {
1199
- # "id" => "rfinex",
1200
- # "name" => "Rfinex"
1201
- # }, {
1202
- # "id" => "safe_trade",
1203
- # "name" => "SafeTrade"
1204
- # }, {
1205
- # "id" => "sakeswap",
1206
- # "name" => "SakeSwap"
1207
- # }, {
1208
- # "id" => "sashimiswap",
1209
- # "name" => "Sashimiswap"
1210
- # }, {
1211
- # "id" => "satoexchange",
1212
- # "name" => "SatoExchange"
1213
- # }, {
1214
- # "id" => "saturn_network",
1215
- # "name" => "Saturn Network"
1216
- # }, {
1217
- # "id" => "secondbtc",
1218
- # "name" => "SecondBTC"
1219
- # }, {
1220
- # "id" => "secretswap",
1221
- # "name" => "SecretSwap"
1222
- # }, {
1223
- # "id" => "serum_dex",
1224
- # "name" => "Serum DEX"
1225
- # }, {
1226
- # "id" => "serumswap",
1227
- # "name" => "SerumSwap"
1228
- # }, {
1229
- # "id" => "shortex",
1230
- # "name" => "Shortex"
1231
- # }, {
1232
- # "id" => "simex",
1233
- # "name" => "Simex"
1234
- # }, {
1235
- # "id" => "sinegy",
1236
- # "name" => "SINEGY"
1237
- # }, {
1238
- # "id" => "sistemkoin",
1239
- # "name" => "Sistemkoin"
1240
- # }, {
1241
- # "id" => "six_x",
1242
- # "name" => "6x"
1243
- # }, {
1244
- # "id" => "south_xchange",
1245
- # "name" => "SouthXchange"
1246
- # }, {
1247
- # "id" => "spiritswap",
1248
- # "name" => "SpiritSwap"
1249
- # }, {
1250
- # "id" => "spookyswap",
1251
- # "name" => "Spookyswap"
1252
- # }, {
1253
- # "id" => "stake_cube",
1254
- # "name" => "StakeCube Exchange"
1255
- # }, {
1256
- # "id" => "stellar_term",
1257
- # "name" => "StellarTerm"
1258
- # }, {
1259
- # "id" => "stocks_exchange",
1260
- # "name" => "STEX"
1261
- # }, {
1262
- # "id" => "stormgain",
1263
- # "name" => "Stormgain"
1264
- # }, {
1265
- # "id" => "stormgain_futures",
1266
- # "name" => "Stormgain Futures"
1267
- # }, {
1268
- # "id" => "sushiswap",
1269
- # "name" => "Sushiswap"
1270
- # }, {
1271
- # "id" => "sushiswap_polygon",
1272
- # "name" => "Sushiswap (Polygon POS)"
1273
- # }, {
1274
- # "id" => "swapr",
1275
- # "name" => "Swapr"
1276
- # }, {
1277
- # "id" => "swiftex",
1278
- # "name" => "Swiftex"
1279
- # }, {
1280
- # "id" => "switcheo",
1281
- # "name" => "Switcheo"
1282
- # }, {
1283
- # "id" => "swop_fi",
1284
- # "name" => "Swop.Fi"
1285
- # }, {
1286
- # "id" => "synthetix",
1287
- # "name" => "Synthetix Exchange"
1288
- # }, {
1289
- # "id" => "tdax",
1290
- # "name" => "Satang Pro"
1291
- # }, {
1292
- # "id" => "therocktrading",
1293
- # "name" => "TheRockTrading"
1294
- # }, {
1295
- # "id" => "thodex",
1296
- # "name" => "Thodex"
1297
- # }, {
1298
- # "id" => "tidebit",
1299
- # "name" => "Tidebit"
1300
- # }, {
1301
- # "id" => "tidex",
1302
- # "name" => "Tidex"
1303
- # }, {
1304
- # "id" => "tokenize",
1305
- # "name" => "Tokenize"
1306
- # }, {
1307
- # "id" => "tokenlon",
1308
- # "name" => "Tokenlon"
1309
- # }, {
1310
- # "id" => "tokenomy",
1311
- # "name" => "Tokenomy"
1312
- # }, {
1313
- # "id" => "token_sets",
1314
- # "name" => "TokenSets"
1315
- # }, {
1316
- # "id" => "tokens_net",
1317
- # "name" => "TokensNet"
1318
- # }, {
1319
- # "id" => "toko_crypto",
1320
- # "name" => "TokoCrypto"
1321
- # }, {
1322
- # "id" => "tokok",
1323
- # "name" => "TOKOK"
1324
- # }, {
1325
- # "id" => "tokpie",
1326
- # "name" => "Tokpie"
1327
- # }, {
1328
- # "id" => "tomodex",
1329
- # "name" => "TomoDEX"
1330
- # }, {
1331
- # "id" => "topbtc",
1332
- # "name" => "TopBTC"
1333
- # }, {
1334
- # "id" => "trade_ogre",
1335
- # "name" => "TradeOgre"
1336
- # }, {
1337
- # "id" => "tron_trade",
1338
- # "name" => "TronTrade"
1339
- # }, {
1340
- # "id" => "trx_market",
1341
- # "name" => "PoloniDEX"
1342
- # }, {
1343
- # "id" => "txbit",
1344
- # "name" => "Txbit"
1345
- # }, {
1346
- # "id" => "ubeswap",
1347
- # "name" => "Ubeswap"
1348
- # }, {
1349
- # "id" => "unicly",
1350
- # "name" => "Unicly"
1351
- # }, {
1352
- # "id" => "uniswap",
1353
- # "name" => "Uniswap (v3)"
1354
- # }, {
1355
- # "id" => "uniswap_v1",
1356
- # "name" => "Uniswap (v1)"
1357
- # }, {
1358
- # "id" => "uniswap_v2",
1359
- # "name" => "Uniswap (v2)"
1360
- # }, {
1361
- # "id" => "unnamed",
1362
- # "name" => "Unnamed"
1363
- # }, {
1364
- # "id" => "upbit",
1365
- # "name" => "Upbit"
1366
- # }, {
1367
- # "id" => "upbit_indonesia",
1368
- # "name" => "Upbit Indonesia "
1369
- # }, {
1370
- # "id" => "value_liquid",
1371
- # "name" => "Value Liquid"
1372
- # }, {
1373
- # "id" => "value_liquid_bsc",
1374
- # "name" => "vSwap BSC"
1375
- # }, {
1376
- # "id" => "vb",
1377
- # "name" => "VB"
1378
- # }, {
1379
- # "id" => "vcc",
1380
- # "name" => "VCC Exchange"
1381
- # }, {
1382
- # "id" => "vebitcoin",
1383
- # "name" => "Vebitcoin"
1384
- # }, {
1385
- # "id" => "velic",
1386
- # "name" => "Velic"
1387
- # }, {
1388
- # "id" => "vindax",
1389
- # "name" => "Vindax"
1390
- # }, {
1391
- # "id" => "vinex",
1392
- # "name" => "Vinex"
1393
- # }, {
1394
- # "id" => "viperswap",
1395
- # "name" => "ViperSwap"
1396
- # }, {
1397
- # "id" => "virgox",
1398
- # "name" => "Virgox"
1399
- # }, {
1400
- # "id" => "vitex",
1401
- # "name" => "ViteX"
1402
- # }, {
1403
- # "id" => "wault_swap",
1404
- # "name" => "WaultSwap"
1405
- # }, {
1406
- # "id" => "waves",
1407
- # "name" => "Waves.Exchange"
1408
- # }, {
1409
- # "id" => "wazirx",
1410
- # "name" => "WazirX"
1411
- # }, {
1412
- # "id" => "whale_ex",
1413
- # "name" => "WhaleEx"
1414
- # }, {
1415
- # "id" => "whitebit",
1416
- # "name" => "WhiteBIT"
1417
- # }, {
1418
- # "id" => "xcoex",
1419
- # "name" => "XCOEX"
1420
- # }, {
1421
- # "id" => "xfutures",
1422
- # "name" => "xFutures"
1423
- # }, {
1424
- # "id" => "xt",
1425
- # "name" => "XT.COM"
1426
- # }, {
1427
- # "id" => "yobit",
1428
- # "name" => "YoBit"
1429
- # }, {
1430
- # "id" => "yunex",
1431
- # "name" => "Yunex.io"
1432
- # }, {
1433
- # "id" => "zaif",
1434
- # "name" => "Zaif"
1435
- # }, {
1436
- # "id" => "zb",
1437
- # "name" => "ZB"
1438
- # }, {
1439
- # "id" => "zbg",
1440
- # "name" => "ZBG"
1441
- # }, {
1442
- # "id" => "zbg_futures",
1443
- # "name" => "ZBG Futures"
1444
- # }, {
1445
- # "id" => "zbx",
1446
- # "name" => "ZBX"
1447
- # }, {
1448
- # "id" => "zebitex",
1449
- # "name" => "Zebitex"
1450
- # }, {
1451
- # "id" => "zebpay",
1452
- # "name" => "ZebPay"
1453
- # }, {
1454
- # "id" => "zero_ex",
1455
- # "name" => "0x Protocol"
1456
- # }, {
1457
- # "id" => "zero_exchange",
1458
- # "name" => "Zero Exchange"
1459
- # }, {
1460
- # "id" => "zg",
1461
- # "name" => "ZG.com"
1462
- # }, {
1463
- # "id" => "zgtop",
1464
- # "name" => "ZG.TOP"
1465
- # }, {
1466
- # "id" => "zilswap",
1467
- # "name" => "Zilswap"
1468
- # }, {
1469
- # "id" => "zipmex",
1470
- # "name" => "Zipmex"
1471
- # }, {
1472
- # "id" => "zkswap",
1473
- # "name" => "ZKSwap"
1474
70
  # }]
1475
- def get_exchange_ids
71
+ def exchange_ids
1476
72
  get 'exchanges/list'
1477
73
  end
1478
74
 
75
+ # @deprecated Use {#exchange_ids} instead
76
+ def get_exchanges_ids
77
+ exchange_ids
78
+ end
79
+
1479
80
  # Fetches coin tickers from a specific exchange.
1480
81
  #
1481
82
  # @param id [String] the exchange id to fetch.
83
+ #
1482
84
  # @option options [String] :coin_ids comma-separated list of tickers to fetch from the given exchange id (e.g. 'bitcoin, eth, litecoin').
1483
85
  # @option options [String] :include_exchange_logo includes the exchange's logo.
1484
86
  # @option options [Integer] :page sets the page for results.
@@ -1488,8 +90,8 @@ module CoingeckoRuby
1488
90
  # @return [Hash] the exchange name and tickers as provided or all tickers if coin_ids is not provided.
1489
91
  #
1490
92
  # @example Get Bitcoin tickers from Binance.
1491
- # client.get_exchange_tickers(id: 'binance', options: { coin_ids: 'bitcoin' })
1492
- # @example Response object
93
+ # client.exchange_tickers('binance', coin_ids: 'bitcoin')
94
+ # @example Sample response object
1493
95
  # {
1494
96
  # "name" => "Binance", "tickers" => [{
1495
97
  # "base" => "BTC",
@@ -1516,48 +118,29 @@ module CoingeckoRuby
1516
118
  # "token_info_url" => nil,
1517
119
  # "coin_id" => "bitcoin",
1518
120
  # "target_coin_id" => "tether"
1519
- # }, {
1520
- # "base" => "BTC",
1521
- # "target" => "BUSD",
1522
- # "market" => {
1523
- # "name" => "Binance", "identifier" => "binance", "has_trading_incentive" => false
1524
- # },
1525
- # "last" => 48929.1,
1526
- # "volume" => 18176.952406055105,
1527
- # "converted_last" => {
1528
- # "btc" => 0.9991652, "eth" => 12.710228, "usd" => 48862
1529
- # },
1530
- # "converted_volume" => {
1531
- # "btc" => 18162, "eth" => 231033, "usd" => 888164944
1532
- # },
1533
- # "trust_score" => "green",
1534
- # "bid_ask_spread_percentage" => 0.01002,
1535
- # "timestamp" => "2021-05-16T07:43:46+00:00",
1536
- # "last_traded_at" => "2021-05-16T07:43:46+00:00",
1537
- # "last_fetch_at" => "2021-05-16T07:43:46+00:00",
1538
- # "is_anomaly" => false,
1539
- # "is_stale" => false,
1540
- # "trade_url" => "https://www.binance.com/en/trade/BTC_BUSD?ref=37754157",
1541
- # "token_info_url" => nil,
1542
- # "coin_id" => "bitcoin",
1543
- # "target_coin_id" => "binance-usd"
1544
121
  # }]
1545
122
  # }
123
+ def exchange_tickers(id, **options)
124
+ get "exchanges/#{id}/tickers", options
125
+ end
126
+
127
+ # @deprecated Use {#exchange_tickers} instead
1546
128
  def get_exchange_tickers(id:, options: {})
1547
- get "exchanges/#{id}/tickers", { options: options }
129
+ exchange_tickers(id, **options)
1548
130
  end
1549
131
 
1550
132
  # Fetches news,announcments, and updates from a specific exchange.
1551
133
  #
1552
134
  # @param id [String] the exchange id to fetch.
135
+ #
1553
136
  # @option options [Integer] :per_page (100) sets the number of results to return per page.
1554
137
  # @option options [Integer] :page sets the page for results.
1555
138
  #
1556
139
  # @return [Hash] the status update data for the given exchange.
1557
140
  #
1558
141
  # @example Get the last 3 status updates from Binance.
1559
- # client.get_exchange_status_updates(id: 'binance', options: { per_page: 1 })
1560
- # @example Response object
142
+ # client.exchange_status('binance', per_page: 1)
143
+ # @example Sample response object
1561
144
  # {
1562
145
  # "status_updates" => [{
1563
146
  # "description" => "Juventus and Paris Saint-Germain Fan Tokens on Binance Launchpool! \r\n\r\nFarm JUV and PSG tokens By Staking BNB, BUSD & CHZ Tokens\r\n\r\nClick here➡️ https://ter.li/JUV-and-PSG-tokens",
@@ -1573,27 +156,37 @@ module CoingeckoRuby
1573
156
  # }
1574
157
  # }]
1575
158
  # }
159
+ def exchange_status(id, **options)
160
+ get "exchanges/#{id}/status_updates", options
161
+ end
162
+
163
+ # @deprecated Use {#exchange_status} instead
1576
164
  def get_exchange_status_updates(id:, options: {})
1577
- get "exchanges/#{id}/status_updates", { options: options }
165
+ exchange_status(id, **options)
1578
166
  end
1579
167
 
1580
168
  # Fetches trade volume data from a specific exchange.
1581
169
  #
1582
170
  # @param id [String] the exchange id to fetch.
1583
- # @param days [Integer] number of days ago to fetch trade volume data.
171
+ # @param days [Integer] number of days ago to fetch trade volume data. Defaults to 7 days.
1584
172
  #
1585
173
  # @return [Array<Array<Float, String>>] the exchange's trade volume data in 10-minute intervals, hourly intervals, or daily intervals depending on the number of days given
1586
174
  #
1587
175
  # @example Get Binance's trade volume from a day ago.
1588
- # client.get_exchange_volume(id: 'binance', days: 1)
1589
- # @example Response object (truncated)
176
+ # client.exchange_volume('binance', days: 1)
177
+ # @example Sample response object (truncated)
1590
178
  # [
1591
179
  # [1620550200000.0, "1005476.2667217359131632087795432176371669876601688256288859094077173967202827700534809705802"], # [UNIX timestamp for exchange trade volume data, trade volume]
1592
180
  # [1620553800000.0, "1018442.2775982988468591292487708941265043962519659923872972786095536137127193126138169804088"],
1593
181
  # [1620557400000.0, "1042158.4333253484568599192332614201045319574863305612009609211497295171074087677404153278624"]
1594
182
  # ]
183
+ def exchange_volume(id, days: 7, **options)
184
+ get "exchanges/#{id}/volume_chart", { days: days, **options }
185
+ end
186
+
187
+ # @deprecated Use {#exchange_volume} instead
1595
188
  def get_exchange_volume(id:, days:)
1596
- get "exchanges/#{id}/volume_chart", { days: days }
189
+ exchange_volume(id, days: days)
1597
190
  end
1598
191
  end
1599
192
  end