coinmarketcap_free 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4297fadc64121db9012143a350b4030cd841416f7a7b6fdeb07b46a3234b6af9
4
- data.tar.gz: 9860e70e322113e3cc9fbeae4af47a71c0f69032931b28705fb09448fdf42091
3
+ metadata.gz: 669d745040747a98dbe9ffc2842a39b4b7bb7da5c31229c445a3e5d8d7c2a18a
4
+ data.tar.gz: 954e9acd92f61f5aa4974660bd76d360e8e329d1c1c59a1e6589eda8f2fdb3ff
5
5
  SHA512:
6
- metadata.gz: 47a049b178e777f9bf609ccd2a4015e36e4340626dc311d9850adc513e8530020c7a68a16a9d501bad48bcdf4fed516cbf4dd3f9454c000f7d0aed7aa92b811a
7
- data.tar.gz: c54fc0e35cbbf0dc6c36f3ea8426eeaacfb11116baa46adb14b9638941d6d6f6c48eb4c395692b21371c832d6efcb7caddfc37fb9290323c8c6b0763f91f8b35
6
+ metadata.gz: 5d9c32b8e9e77b00cd8a4b50bbd74716115b9c5661c9483fba51d40855394b1e63091827b5e66e7660881bc019c81534ea7ee0602d05091bdf721c7d9a7b6206
7
+ data.tar.gz: 2b9bce59829077e729b8e4da1c915ae08cd82f6c7fe5a4853767e664a39232da34917d3f0a9b9c879df4e218fed5a54b5d0f435113d41142cec58512abc8da95
data/Gemfile CHANGED
@@ -1,16 +1,16 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in coinmarketcap_free.gemspec
6
- gemspec
7
-
8
- gem 'uri', "~> 0.12.0"
9
- gem "net-http", "~> 0.3.0"
10
- gem "openssl", "~> 3.0"
11
- gem "json", "~> 2.6"
12
-
13
- group :test do
14
- gem "rake", "~> 13.0"
15
- gem "minitest", "~> 5.0"
16
- end
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in coinmarketcap_free.gemspec
6
+ gemspec
7
+
8
+ gem 'uri', "~> 0.12.0"
9
+ gem "net-http", "~> 0.3.0"
10
+ gem "openssl", "~> 3.0"
11
+ gem "json", "~> 2.6"
12
+
13
+ group :test do
14
+ gem "rake", "~> 13.0"
15
+ gem "minitest", "~> 5.0"
16
+ end
data/Gemfile.lock CHANGED
@@ -1,30 +1,30 @@
1
- PATH
2
- remote: .
3
- specs:
4
- coinmarketcap_free (0.1.4)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- json (2.6.2)
10
- minitest (5.16.3)
11
- net-http (0.3.0)
12
- uri
13
- openssl (3.0.1)
14
- rake (13.0.6)
15
- uri (0.12.0)
16
-
17
- PLATFORMS
18
- x86_64-linux
19
-
20
- DEPENDENCIES
21
- coinmarketcap_free!
22
- json (~> 2.6)
23
- minitest (~> 5.0)
24
- net-http (~> 0.3.0)
25
- openssl (~> 3.0)
26
- rake (~> 13.0)
27
- uri (~> 0.12.0)
28
-
29
- BUNDLED WITH
30
- 2.3.26
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ coinmarketcap_free (0.1.5)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ json (2.6.2)
10
+ minitest (5.16.3)
11
+ net-http (0.3.0)
12
+ uri
13
+ openssl (3.0.1)
14
+ rake (13.0.6)
15
+ uri (0.12.0)
16
+
17
+ PLATFORMS
18
+ x86_64-linux
19
+
20
+ DEPENDENCIES
21
+ coinmarketcap_free!
22
+ json (~> 2.6)
23
+ minitest (~> 5.0)
24
+ net-http (~> 0.3.0)
25
+ openssl (~> 3.0)
26
+ rake (~> 13.0)
27
+ uri (~> 0.12.0)
28
+
29
+ BUNDLED WITH
30
+ 2.3.26
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 cosmic-1
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 cosmic-1
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,227 +1,216 @@
1
- # CoinmarketcapFree
2
-
3
- Cryptocurrency information from the Coinmarketcap site without a key.
4
-
5
- ## Installation
6
-
7
- Install the gem and add to the application's Gemfile by executing:
8
-
9
- $ bundle add coinmarketcap_free
10
-
11
- If bundler is not being used to manage dependencies, install the gem by executing:
12
-
13
- $ gem install coinmarketcap_free
14
-
15
- ## Usage
16
- You can use the class ```CoinmarketcapFree::Cryptocurrencies``` or single method ```CoinmarketcapFree.coins``` like this.
17
-
18
- ``` Ruby
19
- list = CoinmarketcapFree::Cryptocurrencies.new(limit: 100, start: 1)
20
- list.update
21
- list.get_data
22
- ```
23
-
24
- or
25
-
26
- ``` Ruby
27
- list = CoinmarketcapFree.coins(limit: 100, start: 1)
28
- ```
29
-
30
- Result:
31
- ``` JSON
32
- {
33
- "data": {
34
- "cryptoCurrencyList": [
35
- {
36
- "id": 1,
37
- "name": "Bitcoin",
38
- "symbol": "BTC",
39
- "slug": "bitcoin",
40
- "tags": [
41
- "mineable",
42
- "pow",
43
- "sha-256",
44
- "store-of-value",
45
- "state-channel",
46
- "coinbase-ventures-portfolio",
47
- "three-arrows-capital-portfolio",
48
- "polychain-capital-portfolio",
49
- "binance-labs-portfolio",
50
- "blockchain-capital-portfolio",
51
- "boostvc-portfolio",
52
- "cms-holdings-portfolio",
53
- "dcg-portfolio",
54
- "dragonfly-capital-portfolio",
55
- "electric-capital-portfolio",
56
- "fabric-ventures-portfolio",
57
- "framework-ventures-portfolio",
58
- "galaxy-digital-portfolio",
59
- "huobi-capital-portfolio",
60
- "alameda-research-portfolio",
61
- "a16z-portfolio",
62
- "1confirmation-portfolio",
63
- "winklevoss-capital-portfolio",
64
- "usv-portfolio",
65
- "placeholder-ventures-portfolio",
66
- "pantera-capital-portfolio",
67
- "multicoin-capital-portfolio",
68
- "paradigm-portfolio"
69
- ],
70
- "cmcRank": 1,
71
- "marketPairCount": 9922,
72
- "circulatingSupply": 19256812.0,
73
- "selfReportedCirculatingSupply": 0,
74
- "totalSupply": 19256812.0,
75
- "maxSupply": 21000000.0,
76
- "isActive": 1,
77
- "lastUpdated": "2023-01-09T08:25:00.000Z",
78
- "dateAdded": "2013-04-28T00:00:00.000Z",
79
- "quotes": [
80
- {
81
- "name": "USD",
82
- "price": 17209.447088639048,
83
- "volume24h": 13652714044.770432,
84
- "marketCap": 331399087209.8695,
85
- "percentChange1h": -0.00692023,
86
- "percentChange24h": 1.50954046,
87
- "percentChange7d": 2.78181713,
88
- "lastUpdated": "2023-01-09T08:25:00.000Z",
89
- "percentChange30d": 0.30441134,
90
- "percentChange60d": 3.89490715,
91
- "percentChange90d": -9.99714982,
92
- "fullyDilluttedMarketCap": 361398388861.42,
93
- "marketCapByTotalSupply": 331399087209.8695,
94
- "dominance": 39.0828,
95
- "turnover": 0.0411972,
96
- "ytdPriceChangePercentage": 3.515
97
- }
98
- ],
99
- "isAudited": false
100
- }
101
- ...
102
- ],
103
- "totalCount": "8857"
104
- },
105
- "status": {
106
- "timestamp": "2023-01-08T15:33:30.271Z",
107
- "error_code": "0",
108
- "error_message": "SUCCESS",
109
- "elapsed": "2",
110
- "credit_count": 0
111
- }
112
- }
113
- ```
114
-
115
- If you want to sort in ascending, just write parameter:
116
-
117
- ``` Ruby
118
- list = CoinmarketcapFree::Cryptocurrencies.new(limit: 100, start: 1, sortType:'asc')
119
- ```
120
- or
121
- ``` Ruby
122
- list = CoinmarketcapFree::Cryptocurrencies.new(limit: 100, start: 1)
123
- list.sort_type = 'asc'
124
- ```
125
-
126
- You can also adding sort by:
127
-
128
- ``` Ruby
129
- list = CoinmarketcapFree.coins(limit: 100, start: 1, sortType:'asc', sortBy: 'name')
130
- ```
131
-
132
- Convert cryptocurrency to:
133
-
134
- ``` Ruby
135
- list = CoinmarketcapFree.coins(limit: 100, start: 1, convert: 'USD,BTC,ETH')
136
- ```
137
-
138
-
139
- Parameters for Cryptocurrencies:
140
-
141
- | Name | Type | Description | Examples |
142
- |:------------------------------|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------|
143
- | ```limit:``` | Integer. | Optionally specify the number of results to return. Use this parameter and the "start" parameter to determine your own pagination size. ||
144
- | ```start:``` | Integer. | Optionally offset the start (1-based index) of the paginated list of items to return. ||
145
- | ```sortBy:``` | String. | Default: ```market_cap```. (```rank```, ```name```, ```symbol```, ```date_added```, ```market_cap```, ```market_cap_strict```, ```price```, ```circulating_supply```, ```total_supply```, ```max_supply```, ```num_market_pairs```, ```volume_24h```, ```percent_change_1h```, ```percent_change_24h```, ```percent_change_7d```, ```market_cap_by_total_supply_strict```, ```volume_7d```, ```volume_30d```). What field to sort the list of cryptocurrencies by. ||
146
- | ```sortType:``` | String. | Default: ```desc```. (```asc``` or ```desc```). The direction in which to order cryptocurrencies against the specified sort. ||
147
- | ```convert:``` | String. | Default: ```USD,BTC,ETH``` . Select cryptocurrencies to exchange (```AUD```, ```BRL```, ```CAD```, ```CHF```, ```CLP```, ```CNY```, ```CZK```, ```DKK```, ```EUR```, ```GBP```, ```HKD```, ```HUF```, ```IDR```, ```ILS```, ```INR```, ```JPY```, ```KRW```, ```MXN```, ```MYR```, ```NOK```, ```NZD```, ```PHP```, ```PKR```, ```PLN```, ```RUB```, ```SEK```, ```SGD```, ```THB```, ```TRY```, ```TWD```, ```ZAR```). | ```USD``` or ```USD,BTC,ETH``` |
148
- | ```cryptoType:``` | String. | Default: ```all```. (```all```, ```coins```, ```tokens```). The type of cryptocurrency to include. ||
149
- | ```tagType:``` | String. | Default: ```all```. (```all```, ```defi```, ```filesharing```). The tag of cryptocurrency to include. ||
150
- | ```audited:``` | Boolean. | Show audited (true) or not (false) ||
151
- | ```aux:``` | String. | Optionally specify a comma-separated list of supplemental data fields to return. Pass ```ath, atl, high24h, low24h, num_market_pairs, cmc_rank, date_added, max_supply, circulating_supply, total_supply, volume_7d, volume_30d, self_reported_circulating_supply, self_reported_market_cap``` to include all auxiliary fields. | ```ath``` or ```ath, atl, high24h, low24h``` |
152
- | ```tags:``` | string. | If you want to see cryptocurrencies that can be mined, just type ```mineable```. ||
153
- | ```volume24hRange:``` | String. | Optionally specify a threshold 24 hour USD volume to filter results by. | ```0~100000000000000000``` |
154
- | ```percentChange24hRange:``` | String. | Optionally specify a threshold 24 hour percent change to filter results by. | ```0~100``` or ```-10~100``` |
155
- | ```circulatingSupplyRange:``` | String. | Optionally specify a threshold circulating supply to filter results by. | ```0~100000000000000000``` |
156
- | ```priceRange:``` | String. | Optionally specify a threshold USD price to filter results by. | ```0~100000000000000000``` |
157
- | ```marketCapRange:``` | String. | Optionally specify a threshold market cap to filter results by. | ```0~100000000000000000``` |
158
-
159
- ### Returns an interval of historic market quotes:
160
-
161
- You can use the class ```CoinmarketcapFree::Coin``` or single method ```CoinmarketcapFree.coin_history``` like this.
162
-
163
- ``` Ruby
164
- coin = CoinmarketcapFree::Coin.new(1, '1D')
165
- coin.update
166
- coin.get_data
167
- ```
168
-
169
- or
170
-
171
- ``` Ruby
172
- coin = CoinmarketcapFree.coin_history(1, '1D')
173
- ```
174
-
175
- Result:
176
- ``` JSON
177
- {
178
- "data": {
179
- "points": {
180
- "1673192010": {
181
- "v": [
182
- 16953.771282696678,
183
- 7609543976.45,
184
- 326457581376.786557398500,
185
- 1,
186
- 19255750.00000000000000000000
187
- ],
188
- "c": [
189
- 16953.771282696678,
190
- 7609543976.45,
191
- 326457581376.786557398500
192
- ]
193
- },
194
- ...
195
- }
196
- },
197
- "status": {
198
- "timestamp": "2023-01-08T15:33:30.271Z",
199
- "error_code": "0",
200
- "error_message": "SUCCESS",
201
- "elapsed": "2",
202
- "credit_count": 0
203
- }
204
- }
205
-
206
- ```
207
-
208
- Parameters for Coin:
209
-
210
- | Name | Type | Description | Examples |
211
- |:-----------------|:---------|:----------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
212
- | ```id``` | Integer. | Cryptocurrency identifier from coinmarketcap. | Bitcoin has the number 1 |
213
- | ```range_time``` | String. | Range time. | ```1D```, ```7D```, ```1M```, ```3M```, ```1Y```, ```YTD```, ```ALL``` or custom range ```1668981600~1671659999``` |
214
-
215
- ## Development
216
-
217
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
218
-
219
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
220
-
221
- ## Contributing
222
-
223
- Bug reports and pull requests are welcome on GitHub at https://github.com/cosmic-1/coinmarketcap_free.
224
-
225
- ## License
226
-
227
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
1
+ # CoinmarketcapFree
2
+
3
+ Cryptocurrency information from the Coinmarketcap site without a key.
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+
9
+ $ bundle add coinmarketcap_free
10
+
11
+ If bundler is not being used to manage dependencies, install the gem by executing:
12
+
13
+ $ gem install coinmarketcap_free
14
+
15
+ ## How to use?
16
+
17
+ ``` Ruby
18
+ list = CoinmarketcapFree::Coins.get_list()
19
+ ```
20
+
21
+ Result:
22
+ ``` JSON
23
+ {
24
+ "data": {
25
+ "cryptoCurrencyList": [
26
+ {
27
+ "id": 1,
28
+ "name": "Bitcoin",
29
+ "symbol": "BTC",
30
+ "slug": "bitcoin",
31
+ "tags": [
32
+ "mineable",
33
+ "pow",
34
+ "sha-256",
35
+ "store-of-value",
36
+ "state-channel",
37
+ "coinbase-ventures-portfolio",
38
+ "three-arrows-capital-portfolio",
39
+ "polychain-capital-portfolio",
40
+ "binance-labs-portfolio",
41
+ "blockchain-capital-portfolio",
42
+ "boostvc-portfolio",
43
+ "cms-holdings-portfolio",
44
+ "dcg-portfolio",
45
+ "dragonfly-capital-portfolio",
46
+ "electric-capital-portfolio",
47
+ "fabric-ventures-portfolio",
48
+ "framework-ventures-portfolio",
49
+ "galaxy-digital-portfolio",
50
+ "huobi-capital-portfolio",
51
+ "alameda-research-portfolio",
52
+ "a16z-portfolio",
53
+ "1confirmation-portfolio",
54
+ "winklevoss-capital-portfolio",
55
+ "usv-portfolio",
56
+ "placeholder-ventures-portfolio",
57
+ "pantera-capital-portfolio",
58
+ "multicoin-capital-portfolio",
59
+ "paradigm-portfolio"
60
+ ],
61
+ "cmcRank": 1,
62
+ "marketPairCount": 9922,
63
+ "circulatingSupply": 19256812.0,
64
+ "selfReportedCirculatingSupply": 0,
65
+ "totalSupply": 19256812.0,
66
+ "maxSupply": 21000000.0,
67
+ "isActive": 1,
68
+ "lastUpdated": "2023-01-09T08:25:00.000Z",
69
+ "dateAdded": "2013-04-28T00:00:00.000Z",
70
+ "quotes": [
71
+ {
72
+ "name": "USD",
73
+ "price": 17209.447088639048,
74
+ "volume24h": 13652714044.770432,
75
+ "marketCap": 331399087209.8695,
76
+ "percentChange1h": -0.00692023,
77
+ "percentChange24h": 1.50954046,
78
+ "percentChange7d": 2.78181713,
79
+ "lastUpdated": "2023-01-09T08:25:00.000Z",
80
+ "percentChange30d": 0.30441134,
81
+ "percentChange60d": 3.89490715,
82
+ "percentChange90d": -9.99714982,
83
+ "fullyDilluttedMarketCap": 361398388861.42,
84
+ "marketCapByTotalSupply": 331399087209.8695,
85
+ "dominance": 39.0828,
86
+ "turnover": 0.0411972,
87
+ "ytdPriceChangePercentage": 3.515
88
+ }
89
+ ],
90
+ "isAudited": false
91
+ }
92
+ ...
93
+ ],
94
+ "totalCount": "8857"
95
+ },
96
+ "status": {
97
+ "timestamp": "2023-01-08T15:33:30.271Z",
98
+ "error_code": "0",
99
+ "error_message": "SUCCESS",
100
+ "elapsed": "2",
101
+ "credit_count": 0
102
+ }
103
+ }
104
+ ```
105
+
106
+ If you want to sort in ascending, just write parameter:
107
+
108
+ ``` Ruby
109
+ list = CoinmarketcapFree::Coins.get_list(limit: 100, start: 1, sort_type:'asc')
110
+ ```
111
+
112
+ You can also adding sort by:
113
+
114
+ ``` Ruby
115
+ list = CoinmarketcapFree::Coins.get_list(limit: 100, start: 1, sort_type:'asc', sort_by: 'name')
116
+ ```
117
+
118
+ Convert all cryptocurrencies to USD,BTC,ETH:
119
+
120
+ ``` Ruby
121
+ list = CoinmarketcapFree::Coins.get_list(limit: 100,
122
+ start: 1,
123
+ sort_type:'asc',
124
+ sort_by: 'name',
125
+ convert: 'USD,BTC,ETH')
126
+ ```
127
+
128
+
129
+ Parameters for CoinmarketcapFree::Coins.get_list:
130
+
131
+ | Name | Type | Description | Examples |
132
+ |:------------------------------|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------|
133
+ | ```limit:``` | Integer. | Optionally specify the number of results to return. Use this parameter and the "start" parameter to determine your own pagination size. ||
134
+ | ```start:``` | Integer. | Optionally offset the start (1-based index) of the paginated list of items to return. ||
135
+ | ```sort_by:``` | String. | Default: ```market_cap```. (```rank```, ```name```, ```symbol```, ```date_added```, ```market_cap```, ```market_cap_strict```, ```price```, ```circulating_supply```, ```total_supply```, ```max_supply```, ```num_market_pairs```, ```volume_24h```, ```percent_change_1h```, ```percent_change_24h```, ```percent_change_7d```, ```market_cap_by_total_supply_strict```, ```volume_7d```, ```volume_30d```). What field to sort the list of cryptocurrencies by. ||
136
+ | ```sort_type:``` | String. | Default: ```desc```. (```asc``` or ```desc```). The direction in which to order cryptocurrencies against the specified sort. ||
137
+ | ```convert:``` | String. | Default: ```USD,BTC,ETH``` . Select cryptocurrencies to exchange (```AUD```, ```BRL```, ```CAD```, ```CHF```, ```CLP```, ```CNY```, ```CZK```, ```DKK```, ```EUR```, ```GBP```, ```HKD```, ```HUF```, ```IDR```, ```ILS```, ```INR```, ```JPY```, ```KRW```, ```MXN```, ```MYR```, ```NOK```, ```NZD```, ```PHP```, ```PKR```, ```PLN```, ```RUB```, ```SEK```, ```SGD```, ```THB```, ```TRY```, ```TWD```, ```ZAR```). | ```USD``` or ```USD,BTC,ETH``` |
138
+ | ```crypto_type:``` | String. | Default: ```all```. (```all```, ```coins```, ```tokens```). The type of cryptocurrency to include. ||
139
+ | ```tag_type:``` | String. | Default: ```all```. (```all```, ```defi```, ```filesharing```). The tag of cryptocurrency to include. ||
140
+ | ```audited:``` | Boolean. | Show audited (true) or not (false) ||
141
+ | ```aux:``` | String. | Optionally specify a comma-separated list of supplemental data fields to return. Pass ```ath, atl, high24h, low24h, num_market_pairs, cmc_rank, date_added, max_supply, circulating_supply, total_supply, volume_7d, volume_30d, self_reported_circulating_supply, self_reported_market_cap``` to include all auxiliary fields. | ```ath``` or ```ath, atl, high24h, low24h``` |
142
+ | ```tags:``` | string. | If you want to see cryptocurrencies that can be mined, just type ```mineable```. ||
143
+ | ```volume24h_range:``` | String. | Optionally specify a threshold 24 hour USD volume to filter results by. | ```0~100000000000000000``` |
144
+ | ```percent_change24h_range:``` | String. | Optionally specify a threshold 24 hour percent change to filter results by. | ```0~100``` or ```-10~100``` |
145
+ | ```circulating_supply_range:``` | String. | Optionally specify a threshold circulating supply to filter results by. | ```0~100000000000000000``` |
146
+ | ```price_range:``` | String. | Optionally specify a threshold USD price to filter results by. | ```0~100000000000000000``` |
147
+ | ```market_cap_range:``` | String. | Optionally specify a threshold market cap to filter results by. | ```0~100000000000000000``` |
148
+
149
+ ### Returns an interval of historic market quotes:
150
+
151
+ ``` Ruby
152
+ coin = CoinmarketcapFree::CoinHistory.custom_time(1, '1D')
153
+ coin = CoinmarketcapFree::CoinHistory.custom_time(1, '1668981600~1671659999')
154
+ ```
155
+
156
+ or
157
+
158
+ ``` Ruby
159
+ coin = CoinmarketcapFree::CoinHistory.interval_day(1)
160
+ coin = CoinmarketcapFree::CoinHistory.interval_seven_days(1)
161
+ coin = CoinmarketcapFree::CoinHistory.interval_all_time(1)
162
+ ```
163
+
164
+ Result:
165
+ ``` JSON
166
+ {
167
+ "data": {
168
+ "points": {
169
+ "1673192010": {
170
+ "v": [
171
+ 16953.771282696678,
172
+ 7609543976.45,
173
+ 326457581376.786557398500,
174
+ 1,
175
+ 19255750.00000000000000000000
176
+ ],
177
+ "c": [
178
+ 16953.771282696678,
179
+ 7609543976.45,
180
+ 326457581376.786557398500
181
+ ]
182
+ },
183
+ ...
184
+ }
185
+ },
186
+ "status": {
187
+ "timestamp": "2023-01-08T15:33:30.271Z",
188
+ "error_code": "0",
189
+ "error_message": "SUCCESS",
190
+ "elapsed": "2",
191
+ "credit_count": 0
192
+ }
193
+ }
194
+
195
+ ```
196
+
197
+ Parameters for CoinmarketcapFree::CoinHistory.custom_time:
198
+
199
+ | Name | Type | Description | Examples |
200
+ |:-----------------|:---------|:----------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
201
+ | ```id``` | Integer. | Cryptocurrency identifier from coinmarketcap. | Bitcoin has the number 1 |
202
+ | ```range_time``` | String. | Range time. | ```1D```, ```7D```, ```1M```, ```3M```, ```1Y```, ```YTD```, ```ALL``` or custom range ```1668981600~1671659999``` |
203
+
204
+ ## Development
205
+
206
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
207
+
208
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
209
+
210
+ ## Contributing
211
+
212
+ Bug reports and pull requests are welcome on GitHub at https://github.com/cosmic-1/coinmarketcap_free.
213
+
214
+ ## License
215
+
216
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).