cryptocompare 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 166dd1bd0cc845936ec9c3384a819baf73fc3af511aa78c667d769a8952db08f
4
- data.tar.gz: c124ae57e1b17cd6021c9c10a994b0ad43945e0dff86b22f4a848b112bcf060d
3
+ metadata.gz: 1dc3b6e818e7359bfb184aaeaa90b5ed266bfb1ec066118e6807ef69c3efb230
4
+ data.tar.gz: 685610211a9e5206e19fcabb390b45ca878ab316e1bdeb6393051ed40be40bdf
5
5
  SHA512:
6
- metadata.gz: 94f5b790558eeddc79ab4d16c1d36faddab1002401be5896a35ee9a9c268580d6bd8ec0358d45ce2f003e781033ee29fdc325c66845bbbca2004ccef93fd8700
7
- data.tar.gz: 7a3ba4957c8dcefc66bfa6192f2d8f24af0ae67d40d7f7626ca92518084ce72f51348ddfa48fff05fca3044495293d8d74fa53eefaaba3317c3bcfe057e879a7
6
+ metadata.gz: a33539e38d4273641843d0408bc564dc2e5b9c19963cc4fd40efc89821740abf99aebef80066d32671ba286307ec052f62bbd9b9097ad538d953f7da940d8be4
7
+ data.tar.gz: 895afafe21754125324f8f7ef00c09e026cd30e845489a0305bf8d05266cc7565b90774b1d2752cfdff323d61bff7de6570151987543d29a929214e549ff3915
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cryptocompare (0.16.0)
4
+ cryptocompare (0.17.0)
5
5
  faraday
6
6
  json
7
7
 
data/README.md CHANGED
@@ -302,33 +302,78 @@ Get data for a currency pair. It returns general block explorer information, agg
302
302
  ```ruby
303
303
  Cryptocompare::CoinSnapshot.find('BTC', 'USD')
304
304
  # => {
305
- # "Response":"Success",
306
- # "Message":"Coin snapshot succesfully returned",
307
- # "Type":100,
308
- # "Data":{
309
- # "Algorithm":"SHA256",
310
- # "ProofType":"PoW",
311
- # "BlockNumber":378345,
312
- # "NetHashesPerSecond":465548431.66333866,
313
- # "TotalCoinsMined":14707625.0,
314
- # "BlockReward":25.0,
315
- # "AggregatedData":{
316
- # "TYPE":"5",
317
- # "MARKET":"CCCAGG",
318
- # "FROMSYMBOL":"BTC",
319
- # "TOSYMBOL":"USD",
320
- # "FLAGS":"4",
321
- # "PRICE":"245.41",
322
- # "LASTUPDATE":"1444520460",
323
- # "LASTVOLUME":"0.0086",
324
- # "LASTVOLUMETO":"2.110268",
325
- # "LASTTRADEID":"1444520460357",
326
- # "VOLUME24HOUR":"49591.48108707269",
327
- # "VOLUME24HOURTO":"12139110.189163648",
328
- # "OPEN24HOUR":"244.41",
329
- # "HIGH24HOUR":"258.37",
330
- # "LOW24HOUR":"239.01000004",
331
- # "LASTMARKET":"Huobi"
305
+ # "Response":"Success",
306
+ # "Message":"Total available exchanges - 107",
307
+ # "Type":100,
308
+ # "Data": {
309
+ # "CoinInfo"=> {
310
+ # "Id"=>"1182",
311
+ # "Name"=>"BTC",
312
+ # "FullName"=>"Bitcoin",
313
+ # "Internal"=>"BTC",
314
+ # "ImageUrl"=>"/media/37746251/btc.png",
315
+ # "Url"=>"/coins/btc/overview",
316
+ # "Algorithm"=>"SHA-256",
317
+ # "ProofType"=>"PoW",
318
+ # "TotalCoinsMined"=>18873906,
319
+ # "BlockNumber"=>710736,
320
+ # "NetHashesPerSecond"=>152163633011463750000,
321
+ # "BlockReward"=>6.25,
322
+ # "BlockTime"=>637,
323
+ # "AssetLaunchDate"=>"2009-01-03",
324
+ # "MaxSupply"=>20999999.9769,
325
+ # "MktCapPenalty"=>0,
326
+ # "TotalVolume24H"=>119421.69853408838,
327
+ # "TotalTopTierVolume24H"=>119164.10371469974
328
+ # },
329
+ # "AggregatedData" => {
330
+ # "TYPE"=>"5",
331
+ # "MARKET"=>"CCCAGG",
332
+ # "FROMSYMBOL"=>"BTC",
333
+ # "TOSYMBOL"=>"USD",
334
+ # "FLAGS"=>"1026",
335
+ # "PRICE"=>59405.32,
336
+ # "LASTUPDATE"=>1637524770,
337
+ # "MEDIAN"=>59406,
338
+ # "LASTVOLUME"=>0.0214,
339
+ # "LASTVOLUMETO"=>1271.689008,
340
+ # "LASTTRADEID"=>"aa1gpl99200btcfe",
341
+ # "VOLUMEDAY"=>12490.619219841396,
342
+ # "VOLUMEDAYTO"=>739844937.9215171,
343
+ # "VOLUME24HOUR"=>14980.50732139,
344
+ # "VOLUME24HOURTO"=>888337522.224627,
345
+ # "OPENDAY"=>59770.02,
346
+ # "HIGHDAY"=>60058.65,
347
+ # "LOWDAY"=>58575.6,
348
+ # "OPEN24HOUR"=>59502.04,
349
+ # "HIGH24HOUR"=>60075.96,
350
+ # "LOW24HOUR"=>58554.42,
351
+ # "LASTMARKET"=>"coinfield",
352
+ # "VOLUMEHOUR"=>522.9115465200042,
353
+ # "VOLUMEHOURTO"=>31084371.054275494,
354
+ # "OPENHOUR"=>59528.37,
355
+ # "HIGHHOUR"=>59629.67,
356
+ # "LOWHOUR"=>59298.19,
357
+ # "TOPTIERVOLUME24HOUR"=>14980.50630839,
358
+ # "TOPTIERVOLUME24HOURTO"=>888337462.2300239,
359
+ # "CHANGE24HOUR"=>-96.72000000000116,
360
+ # "CHANGEPCT24HOUR"=>-0.16254904873849899,
361
+ # "CHANGEDAY"=>-364.6999999999971,
362
+ # "CHANGEPCTDAY"=>-0.6101721230810984,
363
+ # "CHANGEHOUR"=>-123.05000000000291,
364
+ # "CHANGEPCTHOUR"=>-0.20670816284740018,
365
+ # "CONVERSIONTYPE"=>"direct",
366
+ # "CONVERSIONSYMBOL"=>"",
367
+ # "SUPPLY"=>18873906,
368
+ # "MKTCAP"=>1121210425579.92,
369
+ # "MKTCAPPENALTY"=>0,
370
+ # "CIRCULATINGSUPPLY"=>18873906,
371
+ # "CIRCULATINGSUPPLYMKTCAP"=>1121210425579.92,
372
+ # "TOTALVOLUME24H"=>119421.69853408838,
373
+ # "TOTALVOLUME24HTO"=>7092699907.396162,
374
+ # "TOTALTOPTIERVOLUME24H"=>119164.10371469974,
375
+ # "TOTALTOPTIERVOLUME24HTO"=>7077397404.903025,
376
+ # "IMAGEURL"=>"/media/37746251/btc.png"
332
377
  # },
333
378
  # "Exchanges":[
334
379
  # {
@@ -3,7 +3,8 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module CoinList
6
- API_URL = 'https://min-api.cryptocompare.com/data/all/coinlist'
6
+ API_URL = 'https://min-api.cryptocompare.com/data/all/coinlist'.freeze
7
+ private_constant :API_URL
7
8
 
8
9
  # Get general info for all the coins available on Cryptocompare's API.
9
10
  #
@@ -3,7 +3,8 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module CoinSnapshot
6
- API_URL = 'https://www.cryptocompare.com/api/data/coinsnapshot/'
6
+ API_URL = 'https://min-api.cryptocompare.com/data/top/exchanges/full'.freeze
7
+ private_constant :API_URL
7
8
 
8
9
  # Get data for a currency pair. It returns general block explorer
9
10
  # information, aggregated data and individual data for each exchange
@@ -3,7 +3,8 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module Exchanges
6
- API_URL = 'https://min-api.cryptocompare.com/data/all/exchanges'
6
+ API_URL = 'https://min-api.cryptocompare.com/data/all/exchanges'.freeze
7
+ private_constant :API_URL
7
8
 
8
9
  # Get exchange data, such as cryptocurrencies that each exchange offers, and
9
10
  # the supported conversion cryptocurrencies.
@@ -3,7 +3,8 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module HistoDay
6
- API_URL = 'https://min-api.cryptocompare.com/data/histoday'
6
+ API_URL = 'https://min-api.cryptocompare.com/data/histoday'.freeze
7
+ private_constant :API_URL
7
8
 
8
9
  # Get open, high, low, close, volumefrom and volumeto daily historical data.
9
10
  # The values are based on 00:00 GMT time. It uses BTC conversion if data is
@@ -3,7 +3,8 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module HistoHour
6
- API_URL = 'https://min-api.cryptocompare.com/data/histohour'
6
+ API_URL = 'https://min-api.cryptocompare.com/data/histohour'.freeze
7
+ private_constant :API_URL
7
8
 
8
9
  # Get open, high, low, close, volumefrom and volumeto from the each hour
9
10
  # historical data. It uses BTC conversion if data is not available because
@@ -3,7 +3,8 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module HistoMinute
6
- API_URL = 'https://min-api.cryptocompare.com/data/histominute'
6
+ API_URL = 'https://min-api.cryptocompare.com/data/histominute'.freeze
7
+ private_constant :API_URL
7
8
 
8
9
  # Get open, high, low, close, volumefrom and volumeto for each minute of
9
10
  # historical data. This data is only stored for 7 days, if you need more,
@@ -3,8 +3,11 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module News
6
- NEWS_API_URL = 'https://min-api.cryptocompare.com/data/news/'
7
- NEWS_PROVIDERS_API_URL = 'https://min-api.cryptocompare.com/data/news/providers'
6
+ NEWS_API_URL = 'https://min-api.cryptocompare.com/data/news/'.freeze
7
+ private_constant :NEWS_API_URL
8
+
9
+ NEWS_PROVIDERS_API_URL = 'https://min-api.cryptocompare.com/data/news/providers'.freeze
10
+ private_constant :NEWS_PROVIDERS_API_URL
8
11
 
9
12
  # Returns news articles from the providers that CryptoCompare has integrated
10
13
  # with.
@@ -3,10 +3,17 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module Price
6
- PRICE_API_URL = 'https://min-api.cryptocompare.com/data/pricemulti'
7
- PRICE_FULL_API_URL = 'https://min-api.cryptocompare.com/data/pricemultifull'
8
- GENERATE_AVG_API_URL = 'https://min-api.cryptocompare.com/data/generateAvg'
9
- DAY_AVG_API_URL = 'https://min-api.cryptocompare.com/data/dayAvg'
6
+ PRICE_API_URL = 'https://min-api.cryptocompare.com/data/pricemulti'.freeze
7
+ private_constant :PRICE_API_URL
8
+
9
+ PRICE_FULL_API_URL = 'https://min-api.cryptocompare.com/data/pricemultifull'.freeze
10
+ private_constant :PRICE_FULL_API_URL
11
+
12
+ GENERATE_AVG_API_URL = 'https://min-api.cryptocompare.com/data/generateAvg'.freeze
13
+ private_constant :GENERATE_AVG_API_URL
14
+
15
+ DAY_AVG_API_URL = 'https://min-api.cryptocompare.com/data/dayAvg'.freeze
16
+ private_constant :DAY_AVG_API_URL
10
17
 
11
18
  # Finds the currency price(s) of a given currency symbol. Really fast,
12
19
  # 20-60 ms. Cached each 10 seconds.
@@ -3,7 +3,8 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module PriceHistorical
6
- API_URL = 'https://min-api.cryptocompare.com/data/pricehistorical'
6
+ API_URL = 'https://min-api.cryptocompare.com/data/pricehistorical'.freeze
7
+ private_constant :API_URL
7
8
 
8
9
  # Finds the price of any cryptocurrency in any other currency that you need
9
10
  # at a given timestamp. The price comes from the daily info - so it would be
@@ -3,7 +3,8 @@ require 'json'
3
3
 
4
4
  module Cryptocompare
5
5
  module TopPairs
6
- API_URL = 'https://min-api.cryptocompare.com/data/top/pairs'
6
+ API_URL = 'https://min-api.cryptocompare.com/data/top/pairs'.freeze
7
+ private_constant :API_URL
7
8
 
8
9
  # Get top pairs by volume for a currency (always uses aggregated data).
9
10
  # The number of pairs you get is the minimum of the limit you set
@@ -1,3 +1,3 @@
1
1
  module Cryptocompare
2
- VERSION = "0.16.0"
2
+ VERSION = "0.17.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptocompare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander David Pan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-19 00:00:00.000000000 Z
11
+ date: 2021-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler