coinmarketcap_client 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +121 -0
  4. data/Rakefile +8 -0
  5. data/coinmarketcap_api.gemspec +45 -0
  6. data/coinmarketcap_client.gemspec +45 -0
  7. data/docs/DefaultApi.md +262 -0
  8. data/docs/Info.md +18 -0
  9. data/docs/InfoUrls.md +15 -0
  10. data/docs/InlineResponse200.md +9 -0
  11. data/docs/InlineResponse2001.md +9 -0
  12. data/docs/InlineResponse2002.md +9 -0
  13. data/docs/InlineResponse2003.md +9 -0
  14. data/docs/InlineResponse2004.md +9 -0
  15. data/docs/InlineResponse2005.md +9 -0
  16. data/docs/InlineResponseDefault.md +8 -0
  17. data/docs/InlineResponseDefault1.md +8 -0
  18. data/docs/Map.md +15 -0
  19. data/docs/MarketData.md +21 -0
  20. data/docs/Platform.md +12 -0
  21. data/docs/Quote.md +14 -0
  22. data/docs/Status.md +12 -0
  23. data/git_push.sh +55 -0
  24. data/lib/coinmarketcap_api.rb +50 -0
  25. data/lib/coinmarketcap_api/api/default_api.rb +145 -0
  26. data/lib/coinmarketcap_api/api_client.rb +389 -0
  27. data/lib/coinmarketcap_api/api_error.rb +38 -0
  28. data/lib/coinmarketcap_api/configuration.rb +209 -0
  29. data/lib/coinmarketcap_api/models/info.rb +276 -0
  30. data/lib/coinmarketcap_api/models/info_urls.rb +263 -0
  31. data/lib/coinmarketcap_api/models/inline_response_200.rb +194 -0
  32. data/lib/coinmarketcap_api/models/inline_response_200_1.rb +185 -0
  33. data/lib/coinmarketcap_api/models/inline_response_200_2.rb +194 -0
  34. data/lib/coinmarketcap_api/models/inline_response_200_3.rb +185 -0
  35. data/lib/coinmarketcap_api/models/inline_response_default.rb +183 -0
  36. data/lib/coinmarketcap_api/models/inline_response_default_1.rb +183 -0
  37. data/lib/coinmarketcap_api/models/map.rb +246 -0
  38. data/lib/coinmarketcap_api/models/status.rb +219 -0
  39. data/lib/coinmarketcap_api/version.rb +15 -0
  40. data/lib/coinmarketcap_client.rb +55 -0
  41. data/lib/coinmarketcap_client/api/default_api.rb +300 -0
  42. data/lib/coinmarketcap_client/api_client.rb +389 -0
  43. data/lib/coinmarketcap_client/api_error.rb +38 -0
  44. data/lib/coinmarketcap_client/configuration.rb +209 -0
  45. data/lib/coinmarketcap_client/models/info.rb +276 -0
  46. data/lib/coinmarketcap_client/models/info_urls.rb +263 -0
  47. data/lib/coinmarketcap_client/models/inline_response_200.rb +194 -0
  48. data/lib/coinmarketcap_client/models/inline_response_200_1.rb +194 -0
  49. data/lib/coinmarketcap_client/models/inline_response_200_2.rb +194 -0
  50. data/lib/coinmarketcap_client/models/inline_response_200_3.rb +194 -0
  51. data/lib/coinmarketcap_client/models/inline_response_200_4.rb +194 -0
  52. data/lib/coinmarketcap_client/models/inline_response_200_5.rb +194 -0
  53. data/lib/coinmarketcap_client/models/inline_response_default.rb +183 -0
  54. data/lib/coinmarketcap_client/models/inline_response_default_1.rb +183 -0
  55. data/lib/coinmarketcap_client/models/map.rb +246 -0
  56. data/lib/coinmarketcap_client/models/market_data.rb +304 -0
  57. data/lib/coinmarketcap_client/models/platform.rb +220 -0
  58. data/lib/coinmarketcap_client/models/quote.rb +237 -0
  59. data/lib/coinmarketcap_client/models/status.rb +219 -0
  60. data/lib/coinmarketcap_client/version.rb +15 -0
  61. data/spec/api/default_api_spec.rb +63 -0
  62. data/spec/api_client_spec.rb +226 -0
  63. data/spec/configuration_spec.rb +42 -0
  64. data/spec/models/info_spec.rb +101 -0
  65. data/spec/models/info_urls_spec.rb +83 -0
  66. data/spec/models/inline_response_200_1_spec.rb +41 -0
  67. data/spec/models/inline_response_200_2_spec.rb +47 -0
  68. data/spec/models/inline_response_200_3_spec.rb +41 -0
  69. data/spec/models/inline_response_200_4_spec.rb +47 -0
  70. data/spec/models/inline_response_200_5_spec.rb +47 -0
  71. data/spec/models/inline_response_200_spec.rb +47 -0
  72. data/spec/models/inline_response_default_1_spec.rb +41 -0
  73. data/spec/models/inline_response_default_spec.rb +41 -0
  74. data/spec/models/map_spec.rb +83 -0
  75. data/spec/models/market_data_spec.rb +119 -0
  76. data/spec/models/platform_spec.rb +65 -0
  77. data/spec/models/quote_spec.rb +77 -0
  78. data/spec/models/status_spec.rb +65 -0
  79. data/spec/spec_helper.rb +111 -0
  80. metadata +320 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3bc475d564706f5b2d40af56bc8f12c1c281c5bc568caae86a24d57dabc23e88
4
+ data.tar.gz: d2926f697fcc9accdc5d7fdcbaabd487c7068a5a3883b09a5b954b31c7a5a847
5
+ SHA512:
6
+ metadata.gz: 22fe4ce596e9cc4e393c63a0cf27275fa7c04c578363b0d64579eb21e7b9bb70469f29618255bf73e0b9a28962532e0e2438d50dd4c06125d2f09afb7f7c23b7
7
+ data.tar.gz: 37ba6798f62c234ed249f5d8560be2c59df321de9a4bc3a6c209c95daebcfe8fd9123db150db62118fd4fe02c37dca02f89c13416763f81750608f840c626549
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
data/README.md ADDED
@@ -0,0 +1,121 @@
1
+ # coinmarketcap_client
2
+
3
+ CoinmarketcapAPI - the Ruby gem for the Coinmarketcap API Swagger Implementation
4
+
5
+ Define coinmarketcap's api in swagger 2.0 openapi standard
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: 1.0.0
10
+ - Package version: 1.0.0
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build coinmarketcap_client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./coinmarketcap_client-1.0.0.gem
27
+ ```
28
+ (for development, run `gem install --dev ./coinmarketcap_client-1.0.0.gem` to install the development dependencies)
29
+
30
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
+
32
+ Finally add this to the Gemfile:
33
+
34
+ gem 'coinmarketcap_client', '~> 1.0.0'
35
+
36
+ ### Install from Git
37
+
38
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
39
+
40
+ gem 'coinmarketcap_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
41
+
42
+ ### Include the Ruby code directly
43
+
44
+ Include the Ruby code directly using `-I` as follows:
45
+
46
+ ```shell
47
+ ruby -Ilib script.rb
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Please follow the [installation](#installation) procedure and then run the following code:
53
+ ```ruby
54
+ # Load the gem
55
+ require 'coinmarketcap_client'
56
+
57
+ # Setup authorization
58
+ CoinmarketcapAPI.configure do |config|
59
+ # Configure API key authorization: ApiKeyAuth
60
+ config.api_key['X-CMC_PRO_API_KEY'] = 'YOUR API KEY'
61
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
62
+ #config.api_key_prefix['X-CMC_PRO_API_KEY'] = 'Bearer'
63
+ end
64
+
65
+ api_instance = CoinmarketcapAPI::DefaultApi.new
66
+
67
+ opts = {
68
+ id: 'id_example', # String | One or more comma-separated CoinMarketCap cryptocurrency IDs. Example: \"1,2\"
69
+ symbol: 'symbol_example' # String | Alternatively pass one or more comma-separated cryptocurrency symbols. Example: \"BTC,ETH\". At least one \"id\" or \"symbol\" is required.
70
+ }
71
+
72
+ begin
73
+ #Get metadata
74
+ result = api_instance.cryptocurrency_info_get(opts)
75
+ p result
76
+ rescue CoinmarketcapAPI::ApiError => e
77
+ puts "Exception when calling DefaultApi->cryptocurrency_info_get: #{e}"
78
+ end
79
+
80
+ ```
81
+
82
+ ## Documentation for API Endpoints
83
+
84
+ All URIs are relative to *https://pro-api.coinmarketcap.com/v1*
85
+
86
+ Class | Method | HTTP request | Description
87
+ ------------ | ------------- | ------------- | -------------
88
+ *CoinmarketcapAPI::DefaultApi* | [**cryptocurrency_info_get**](docs/DefaultApi.md#cryptocurrency_info_get) | **GET** /cryptocurrency/info | Get metadata
89
+ *CoinmarketcapAPI::DefaultApi* | [**cryptocurrency_listings_historical_get**](docs/DefaultApi.md#cryptocurrency_listings_historical_get) | **GET** /cryptocurrency/listings/historical | List all cryptocurrencies (historical)
90
+ *CoinmarketcapAPI::DefaultApi* | [**cryptocurrency_listings_latest_get**](docs/DefaultApi.md#cryptocurrency_listings_latest_get) | **GET** /cryptocurrency/listings/latest | List all cryptocurrencies (latest)
91
+ *CoinmarketcapAPI::DefaultApi* | [**cryptocurrency_map_get**](docs/DefaultApi.md#cryptocurrency_map_get) | **GET** /cryptocurrency/map | Get CoinMarketCap ID map
92
+
93
+
94
+ ## Documentation for Models
95
+
96
+ - [CoinmarketcapAPI::Info](docs/Info.md)
97
+ - [CoinmarketcapAPI::InfoUrls](docs/InfoUrls.md)
98
+ - [CoinmarketcapAPI::InlineResponse200](docs/InlineResponse200.md)
99
+ - [CoinmarketcapAPI::InlineResponse2001](docs/InlineResponse2001.md)
100
+ - [CoinmarketcapAPI::InlineResponse2002](docs/InlineResponse2002.md)
101
+ - [CoinmarketcapAPI::InlineResponse2003](docs/InlineResponse2003.md)
102
+ - [CoinmarketcapAPI::InlineResponse2004](docs/InlineResponse2004.md)
103
+ - [CoinmarketcapAPI::InlineResponse2005](docs/InlineResponse2005.md)
104
+ - [CoinmarketcapAPI::InlineResponseDefault](docs/InlineResponseDefault.md)
105
+ - [CoinmarketcapAPI::InlineResponseDefault1](docs/InlineResponseDefault1.md)
106
+ - [CoinmarketcapAPI::Map](docs/Map.md)
107
+ - [CoinmarketcapAPI::MarketData](docs/MarketData.md)
108
+ - [CoinmarketcapAPI::Platform](docs/Platform.md)
109
+ - [CoinmarketcapAPI::Quote](docs/Quote.md)
110
+ - [CoinmarketcapAPI::Status](docs/Status.md)
111
+
112
+
113
+ ## Documentation for Authorization
114
+
115
+
116
+ ### ApiKeyAuth
117
+
118
+ - **Type**: API key
119
+ - **API key parameter name**: X-CMC_PRO_API_KEY
120
+ - **Location**: HTTP header
121
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Coinmarketcap API Swagger Implementation
5
+
6
+ #Define coinmarketcap's api in swagger 2.0 openapi standard
7
+
8
+ OpenAPI spec version: 1.0.0
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.4.4
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "coinmarketcap_api/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "coinmarketcap_api"
20
+ s.version = CoinmarketcapAPI::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Joshua Wilkosz"]
23
+ s.email = ["joshua@wilkosz.com.au"]
24
+ s.homepage = "https://github.com/wilkosz/coinmarketcap_api_sdks"
25
+ s.summary = "Swagger 2.0 Implementation of Coinmarketcaps API"
26
+ s.description = "Swagger 2.0 Implementation of Coinmarketcaps API"
27
+ s.license = "Unlicense"
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
@@ -0,0 +1,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Coinmarketcap API Swagger Implementation
5
+
6
+ #Define coinmarketcap's api in swagger 2.0 openapi standard
7
+
8
+ OpenAPI spec version: 1.0.0
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.4.4
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "coinmarketcap_client/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "coinmarketcap_client"
20
+ s.version = CoinmarketcapAPI::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Joshua Wilkosz"]
23
+ s.email = ["joshua@wilkosz.com.au"]
24
+ s.homepage = "https://github.com/wilkosz/coinmarketcap_api_sdks"
25
+ s.summary = "Swagger 2.0 Implementation of Coinmarketcaps API"
26
+ s.description = "Swagger 2.0 Implementation of Coinmarketcaps API"
27
+ s.license = "Unlicense"
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
@@ -0,0 +1,262 @@
1
+ # CoinmarketcapAPI::DefaultApi
2
+
3
+ All URIs are relative to *https://pro-api.coinmarketcap.com/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**cryptocurrency_info_get**](DefaultApi.md#cryptocurrency_info_get) | **GET** /cryptocurrency/info | Get metadata
8
+ [**cryptocurrency_listings_historical_get**](DefaultApi.md#cryptocurrency_listings_historical_get) | **GET** /cryptocurrency/listings/historical | List all cryptocurrencies (historical)
9
+ [**cryptocurrency_listings_latest_get**](DefaultApi.md#cryptocurrency_listings_latest_get) | **GET** /cryptocurrency/listings/latest | List all cryptocurrencies (latest)
10
+ [**cryptocurrency_map_get**](DefaultApi.md#cryptocurrency_map_get) | **GET** /cryptocurrency/map | Get CoinMarketCap ID map
11
+
12
+
13
+ # **cryptocurrency_info_get**
14
+ > InlineResponse2004 cryptocurrency_info_get(opts)
15
+
16
+ Get metadata
17
+
18
+ Returns all static metadata for one or more cryptocurrencies including name, symbol, logo, and its various registered URLs.
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'coinmarketcap_client'
24
+ # setup authorization
25
+ CoinmarketcapAPI.configure do |config|
26
+ # Configure API key authorization: ApiKeyAuth
27
+ config.api_key['X-CMC_PRO_API_KEY'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ #config.api_key_prefix['X-CMC_PRO_API_KEY'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = CoinmarketcapAPI::DefaultApi.new
33
+
34
+ opts = {
35
+ id: 'id_example', # String | One or more comma-separated CoinMarketCap cryptocurrency IDs. Example: \"1,2\"
36
+ symbol: 'symbol_example' # String | Alternatively pass one or more comma-separated cryptocurrency symbols. Example: \"BTC,ETH\". At least one \"id\" or \"symbol\" is required.
37
+ }
38
+
39
+ begin
40
+ #Get metadata
41
+ result = api_instance.cryptocurrency_info_get(opts)
42
+ p result
43
+ rescue CoinmarketcapAPI::ApiError => e
44
+ puts "Exception when calling DefaultApi->cryptocurrency_info_get: #{e}"
45
+ end
46
+ ```
47
+
48
+ ### Parameters
49
+
50
+ Name | Type | Description | Notes
51
+ ------------- | ------------- | ------------- | -------------
52
+ **id** | **String**| One or more comma-separated CoinMarketCap cryptocurrency IDs. Example: \"1,2\" | [optional]
53
+ **symbol** | **String**| Alternatively pass one or more comma-separated cryptocurrency symbols. Example: \"BTC,ETH\". At least one \"id\" or \"symbol\" is required. | [optional]
54
+
55
+ ### Return type
56
+
57
+ [**InlineResponse2004**](InlineResponse2004.md)
58
+
59
+ ### Authorization
60
+
61
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
62
+
63
+ ### HTTP request headers
64
+
65
+ - **Content-Type**: Not defined
66
+ - **Accept**: application/json
67
+
68
+
69
+
70
+ # **cryptocurrency_listings_historical_get**
71
+ > InlineResponse2005 cryptocurrency_listings_historical_get(opts)
72
+
73
+ List all cryptocurrencies (historical)
74
+
75
+ Get a paginated list of all cryptocurrencies with market data for a given historical time. Use the \"convert\" option to return market values in multiple fiat and cryptocurrency conversions in the same call.
76
+
77
+ ### Example
78
+ ```ruby
79
+ # load the gem
80
+ require 'coinmarketcap_client'
81
+ # setup authorization
82
+ CoinmarketcapAPI.configure do |config|
83
+ # Configure API key authorization: ApiKeyAuth
84
+ config.api_key['X-CMC_PRO_API_KEY'] = 'YOUR API KEY'
85
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
86
+ #config.api_key_prefix['X-CMC_PRO_API_KEY'] = 'Bearer'
87
+ end
88
+
89
+ api_instance = CoinmarketcapAPI::DefaultApi.new
90
+
91
+ opts = {
92
+ timestamp: 'timestamp_example', # String | Timestamp (Unix or ISO 8601) to return historical cryptocurrency listings for.
93
+ start: 1, # Integer | Optionally offset the start (1-based index) of the paginated list of items to return.
94
+ limit: 100, # Integer | Optionally specify the number of results to return. Use this parameter and the \"start\" parameter to determine your own pagination size.
95
+ convert: 'USD', # String | Optionally calculate market quotes in up to 120 currencies at once by passing a comma-separated list of cryptocurrency or fiat currency symbols. Each additional convert option beyond the first requires an additional call credit. A list of supported fiat options can be found here. Each conversion is returned in its own \"quote\" object.
96
+ sort: 'market_cap', # String | Valid values: `name` `symbol` `date_added` `market_cap` `price` `circulating_supply` `total_supply` `max_supply` `num_market_pairs` `volume_24h` `percent_change_1h` `percent_change_24h` `percent_change_7d` What field to sort the list of cryptocurrencies by.
97
+ sort_dir: 'sort_dir_example', # String | Valid values: `asc` `desc`. The direction in which to order cryptocurrencies against the specified sort.
98
+ cryptocurrency_type: 'cryptocurrency_type_example' # String | Valid values: `all` `coins` `tokens` The type of cryptocurrency to include.
99
+ }
100
+
101
+ begin
102
+ #List all cryptocurrencies (historical)
103
+ result = api_instance.cryptocurrency_listings_historical_get(opts)
104
+ p result
105
+ rescue CoinmarketcapAPI::ApiError => e
106
+ puts "Exception when calling DefaultApi->cryptocurrency_listings_historical_get: #{e}"
107
+ end
108
+ ```
109
+
110
+ ### Parameters
111
+
112
+ Name | Type | Description | Notes
113
+ ------------- | ------------- | ------------- | -------------
114
+ **timestamp** | **String**| Timestamp (Unix or ISO 8601) to return historical cryptocurrency listings for. | [optional]
115
+ **start** | **Integer**| Optionally offset the start (1-based index) of the paginated list of items to return. | [optional] [default to 1]
116
+ **limit** | **Integer**| Optionally specify the number of results to return. Use this parameter and the \"start\" parameter to determine your own pagination size. | [optional] [default to 100]
117
+ **convert** | **String**| Optionally calculate market quotes in up to 120 currencies at once by passing a comma-separated list of cryptocurrency or fiat currency symbols. Each additional convert option beyond the first requires an additional call credit. A list of supported fiat options can be found here. Each conversion is returned in its own \"quote\" object. | [optional] [default to USD]
118
+ **sort** | **String**| Valid values: `name` `symbol` `date_added` `market_cap` `price` `circulating_supply` `total_supply` `max_supply` `num_market_pairs` `volume_24h` `percent_change_1h` `percent_change_24h` `percent_change_7d` What field to sort the list of cryptocurrencies by. | [optional] [default to market_cap]
119
+ **sort_dir** | **String**| Valid values: `asc` `desc`. The direction in which to order cryptocurrencies against the specified sort. | [optional]
120
+ **cryptocurrency_type** | **String**| Valid values: `all` `coins` `tokens` The type of cryptocurrency to include. | [optional]
121
+
122
+ ### Return type
123
+
124
+ [**InlineResponse2005**](InlineResponse2005.md)
125
+
126
+ ### Authorization
127
+
128
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
129
+
130
+ ### HTTP request headers
131
+
132
+ - **Content-Type**: Not defined
133
+ - **Accept**: application/json
134
+
135
+
136
+
137
+ # **cryptocurrency_listings_latest_get**
138
+ > InlineResponse2005 cryptocurrency_listings_latest_get(opts)
139
+
140
+ List all cryptocurrencies (latest)
141
+
142
+ Get a paginated list of all cryptocurrencies with latest market data. You can configure this call to sort by market cap or another market ranking field. Use the \"convert\" option to return market values in multiple fiat and cryptocurrency conversions in the same call.
143
+
144
+ ### Example
145
+ ```ruby
146
+ # load the gem
147
+ require 'coinmarketcap_client'
148
+ # setup authorization
149
+ CoinmarketcapAPI.configure do |config|
150
+ # Configure API key authorization: ApiKeyAuth
151
+ config.api_key['X-CMC_PRO_API_KEY'] = 'YOUR API KEY'
152
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
153
+ #config.api_key_prefix['X-CMC_PRO_API_KEY'] = 'Bearer'
154
+ end
155
+
156
+ api_instance = CoinmarketcapAPI::DefaultApi.new
157
+
158
+ opts = {
159
+ start: 1, # Integer | Optionally offset the start (1-based index) of the paginated list of items to return.
160
+ limit: 100, # Integer | Optionally specify the number of results to return. Use this parameter and the \"start\" parameter to determine your own pagination size.
161
+ convert: 'USD', # String | Optionally calculate market quotes in up to 120 currencies at once by passing a comma-separated list of cryptocurrency or fiat currency symbols. Each additional convert option beyond the first requires an additional call credit. A list of supported fiat options can be found here. Each conversion is returned in its own \"quote\" object.
162
+ sort: 'market_cap', # String | Valid values: `name` `symbol` `date_added` `market_cap` `price` `circulating_supply` `total_supply` `max_supply` `num_market_pairs` `volume_24h` `percent_change_1h` `percent_change_24h` `percent_change_7d` What field to sort the list of cryptocurrencies by.
163
+ sort_dir: 'sort_dir_example', # String | Valid values: `asc` `desc`. The direction in which to order cryptocurrencies against the specified sort.
164
+ cryptocurrency_type: 'cryptocurrency_type_example' # String | Valid values: `all` `coins` `tokens` The type of cryptocurrency to include.
165
+ }
166
+
167
+ begin
168
+ #List all cryptocurrencies (latest)
169
+ result = api_instance.cryptocurrency_listings_latest_get(opts)
170
+ p result
171
+ rescue CoinmarketcapAPI::ApiError => e
172
+ puts "Exception when calling DefaultApi->cryptocurrency_listings_latest_get: #{e}"
173
+ end
174
+ ```
175
+
176
+ ### Parameters
177
+
178
+ Name | Type | Description | Notes
179
+ ------------- | ------------- | ------------- | -------------
180
+ **start** | **Integer**| Optionally offset the start (1-based index) of the paginated list of items to return. | [optional] [default to 1]
181
+ **limit** | **Integer**| Optionally specify the number of results to return. Use this parameter and the \"start\" parameter to determine your own pagination size. | [optional] [default to 100]
182
+ **convert** | **String**| Optionally calculate market quotes in up to 120 currencies at once by passing a comma-separated list of cryptocurrency or fiat currency symbols. Each additional convert option beyond the first requires an additional call credit. A list of supported fiat options can be found here. Each conversion is returned in its own \"quote\" object. | [optional] [default to USD]
183
+ **sort** | **String**| Valid values: `name` `symbol` `date_added` `market_cap` `price` `circulating_supply` `total_supply` `max_supply` `num_market_pairs` `volume_24h` `percent_change_1h` `percent_change_24h` `percent_change_7d` What field to sort the list of cryptocurrencies by. | [optional] [default to market_cap]
184
+ **sort_dir** | **String**| Valid values: `asc` `desc`. The direction in which to order cryptocurrencies against the specified sort. | [optional]
185
+ **cryptocurrency_type** | **String**| Valid values: `all` `coins` `tokens` The type of cryptocurrency to include. | [optional]
186
+
187
+ ### Return type
188
+
189
+ [**InlineResponse2005**](InlineResponse2005.md)
190
+
191
+ ### Authorization
192
+
193
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
194
+
195
+ ### HTTP request headers
196
+
197
+ - **Content-Type**: Not defined
198
+ - **Accept**: application/json
199
+
200
+
201
+
202
+ # **cryptocurrency_map_get**
203
+ > InlineResponse2003 cryptocurrency_map_get(opts)
204
+
205
+ Get CoinMarketCap ID map
206
+
207
+ Returns a paginated list of all cryptocurrencies by CoinMarketCap ID. We recommend using this convenience endpoint to lookup and utilize our unique cryptocurrency id across all endpoints as typical identifiers like ticker symbols can match multiple cryptocurrencies and change over time. As a convenience you may pass a comma-separated list of cryptocurrency symbols as symbol to filter this list to only those you require.
208
+
209
+ ### Example
210
+ ```ruby
211
+ # load the gem
212
+ require 'coinmarketcap_client'
213
+ # setup authorization
214
+ CoinmarketcapAPI.configure do |config|
215
+ # Configure API key authorization: ApiKeyAuth
216
+ config.api_key['X-CMC_PRO_API_KEY'] = 'YOUR API KEY'
217
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
218
+ #config.api_key_prefix['X-CMC_PRO_API_KEY'] = 'Bearer'
219
+ end
220
+
221
+ api_instance = CoinmarketcapAPI::DefaultApi.new
222
+
223
+ opts = {
224
+ listing_status: 'active', # String | Only active coins are returned by default. Pass 'inactive' to get a list of coins that are no longer active.
225
+ start: 1, # Integer | Optionally offset the start (1-based index) of the paginated list of items to return.
226
+ limit: 56, # Integer | Optionally specify the number of results to return. Use this parameter and the \"start\" parameter to determine your own pagination size.
227
+ symbol: 'symbol_example' # String | Optionally pass a comma-separated list of cryptocurrency symbols to return CoinMarketCap IDs for. If this option is passed, other options will be ignored.
228
+ }
229
+
230
+ begin
231
+ #Get CoinMarketCap ID map
232
+ result = api_instance.cryptocurrency_map_get(opts)
233
+ p result
234
+ rescue CoinmarketcapAPI::ApiError => e
235
+ puts "Exception when calling DefaultApi->cryptocurrency_map_get: #{e}"
236
+ end
237
+ ```
238
+
239
+ ### Parameters
240
+
241
+ Name | Type | Description | Notes
242
+ ------------- | ------------- | ------------- | -------------
243
+ **listing_status** | **String**| Only active coins are returned by default. Pass 'inactive' to get a list of coins that are no longer active. | [optional] [default to active]
244
+ **start** | **Integer**| Optionally offset the start (1-based index) of the paginated list of items to return. | [optional] [default to 1]
245
+ **limit** | **Integer**| Optionally specify the number of results to return. Use this parameter and the \"start\" parameter to determine your own pagination size. | [optional]
246
+ **symbol** | **String**| Optionally pass a comma-separated list of cryptocurrency symbols to return CoinMarketCap IDs for. If this option is passed, other options will be ignored. | [optional]
247
+
248
+ ### Return type
249
+
250
+ [**InlineResponse2003**](InlineResponse2003.md)
251
+
252
+ ### Authorization
253
+
254
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
255
+
256
+ ### HTTP request headers
257
+
258
+ - **Content-Type**: Not defined
259
+ - **Accept**: application/json
260
+
261
+
262
+