cryptocompare 0.10.0 → 0.15.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
- SHA1:
3
- metadata.gz: fb1da60424846af0f722e8ee3857276a56a54cab
4
- data.tar.gz: 607e0325e789895690d4c2e10f12c20201b254cb
2
+ SHA256:
3
+ metadata.gz: 8343ea1a62ef844e2301dee0c200984d73480863aae94abe937a902bf6236a6c
4
+ data.tar.gz: 81e74060ce613c4ef405925ac54d58dee38d6f50e34b7b566812545d27a5f78d
5
5
  SHA512:
6
- metadata.gz: ef0c477aa83c3a8f325a5f74bc858f608a6175cf553f40ded4cf4093288c4138f4e1a25fe5006f71ca817bfc94a86686fc4e0fe71de5ae4e2d351d238ffd7ade
7
- data.tar.gz: cde48298626ef54b0dcac8570219f2d60309f38e5e9f517e14646dfd42a8843b6173a3d536a9f5aed33d90b11ab0abb62c4ecbb559ecdfae577bec4c0a5ce573
6
+ metadata.gz: 05f5da231667c7a777d1070a5dd549103742212bedb6a25161a9c3b8b10d8eee030b306f67518979f462e195259adda2d6cdde72680c522387accfbb010d909e
7
+ data.tar.gz: 14890afb1de24ddc601ca7d3bcc915f12e2baae3ff6f83b6866dbbad11cc3e0a2b4c3a0251c596736c62632e2bd16e4449ab678432e0cf4b90de346e5ecb5062
@@ -1,8 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.0.0
5
- before_install: gem install bundler -v 1.12.5
4
+ - 2.3.0
5
+ before_install: gem install bundler -v 2.1.4
6
6
  addons:
7
7
  code_climate:
8
8
  repo_token:
data/README.md CHANGED
@@ -146,42 +146,42 @@ Generate average price for cryptocurrency to fiat currency.
146
146
  ```ruby
147
147
  Cryptocompare::Price.generate_avg('BTC', 'USD', ['Coinbase', 'Bitfinex'])
148
148
  # => {
149
- # RAW: {
150
- # MARKET: "CUSTOMAGG",
151
- # FROMSYMBOL: "BTC",
152
- # TOSYMBOL: "USD",
153
- # FLAGS: 0,
154
- # PRICE: 4137.43,
155
- # LASTUPDATE: 1503454563,
156
- # LASTVOLUME: 2,
157
- # LASTVOLUMETO: 8271.98,
158
- # LASTTRADEID: 19656029,
159
- # VOLUME24HOUR: 71728.71957884016,
160
- # VOLUME24HOURTO: 279374718.3442189,
161
- # OPEN24HOUR: 3885.85,
162
- # HIGH24HOUR: 4145,
163
- # LOW24HOUR: 3583.46,
164
- # LASTMARKET: "Coinbase",
165
- # CHANGE24HOUR: 251.58000000000038,
166
- # CHANGEPCT24HOUR: 6.474259171095137
149
+ # "RAW" => {
150
+ # "MARKET" => "CUSTOMAGG",
151
+ # "FROMSYMBOL" => "BTC",
152
+ # "TOSYMBOL" => "USD",
153
+ # "FLAGS" => 0,
154
+ # "PRICE" => 4137.43,
155
+ # "LASTUPDATE" => 1503454563,
156
+ # "LASTVOLUME" => 2,
157
+ # "LASTVOLUMETO" => 8271.98,
158
+ # "LASTTRADEID" => 19656029,
159
+ # "VOLUME24HOUR" => 71728.71957884016,
160
+ # "VOLUME24HOURTO" => 279374718.3442189,
161
+ # "OPEN24HOUR" => 3885.85,
162
+ # "HIGH24HOUR" => 4145,
163
+ # "LOW24HOUR" => 3583.46,
164
+ # "LASTMARKET" => "Coinbase",
165
+ # "CHANGE24HOUR" => 251.58000000000038,
166
+ # "CHANGEPCT24HOUR" => 6.474259171095137
167
167
  # },
168
- # DISPLAY: {
169
- # FROMSYMBOL: "Ƀ",
170
- # TOSYMBOL: "$",
171
- # MARKET: "CUSTOMAGG",
172
- # PRICE: "$ 4,137.43",
173
- # LASTUPDATE: "Just now",
174
- # LASTVOLUME: "Ƀ 2",
175
- # LASTVOLUMETO: "$ 8,271.98",
176
- # LASTTRADEID: 19656029,
177
- # VOLUME24HOUR: "Ƀ 71,728.7",
178
- # VOLUME24HOURTO: "$ 279,374,718.3",
179
- # OPEN24HOUR: "$ 3,885.85",
180
- # HIGH24HOUR: "$ 4,145",
181
- # LOW24HOUR: "$ 3,583.46",
182
- # LASTMARKET: "Coinbase",
183
- # CHANGE24HOUR: "$ 251.58",
184
- # CHANGEPCT24HOUR: "6.47"
168
+ # "DISPLAY" => {
169
+ # "FROMSYMBOL" => "Ƀ",
170
+ # "TOSYMBOL" => "$",
171
+ # "MARKET" => "CUSTOMAGG",
172
+ # "PRICE" => "$ 4,137.43",
173
+ # "LASTUPDATE" => "Just now",
174
+ # "LASTVOLUME" => "Ƀ 2",
175
+ # "LASTVOLUMETO" => "$ 8,271.98",
176
+ # "LASTTRADEID" => 19656029,
177
+ # "VOLUME24HOUR" => "Ƀ 71,728.7",
178
+ # "VOLUME24HOURTO" => "$ 279,374,718.3",
179
+ # "OPEN24HOUR" => "$ 3,885.85",
180
+ # "HIGH24HOUR" => "$ 4,145",
181
+ # "LOW24HOUR" => "$ 3,583.46",
182
+ # "LASTMARKET" => "Coinbase",
183
+ # "CHANGE24HOUR" => "$ 251.58",
184
+ # "CHANGEPCT24HOUR" => "6.47"
185
185
  # }
186
186
  # }
187
187
  ```
@@ -226,6 +226,64 @@ Cryptocompare::PriceHistorical.find('ETH', ['BTC', 'USD', 'EUR'], {'ts' => '1452
226
226
  # => {"ETH"=>{"BTC"=>0.08006, "USD"=>225.93, "EUR"=>194.24}}
227
227
  ```
228
228
 
229
+ ### CoinList
230
+
231
+ Get general info for all the coins available on Cryptocompare's API.
232
+
233
+ **Example:**
234
+
235
+ ```ruby
236
+ Cryptocompare::CoinList.all
237
+ # => {
238
+ # "Response" => "Success",
239
+ # "Message" => "Coin list succesfully returned!",
240
+ # "BaseImageUrl" => "https://www.cryptocompare.com",
241
+ # "BaseLinkUrl" => "https://www.cryptocompare.com",
242
+ # "DefaultWatchlist" => {
243
+ # "CoinIs" => "1182,7605,5038,24854,3807,3808,202330,5324,5031,20131",
244
+ # "Sponsored" => ""
245
+ # },
246
+ # "Data" => {
247
+ # "BTC" => {
248
+ # "Id" => "1182",
249
+ # "Url" => "/coins/btc/overview",
250
+ # "ImageUrl" => "/media/19633/btc.png",
251
+ # "Name" => "BTC",
252
+ # "Symbol" => "BTC",
253
+ # "CoinName" => "Bitcoin",
254
+ # "FullName" => "Bitcoin (BTC)",
255
+ # "Algorithm" => "SHA256",
256
+ # "ProofType" => "PoW",
257
+ # "FullyPremined" => "0",
258
+ # "TotalCoinSupply" => "21000000",
259
+ # "PreMinedValue" => "N/A",
260
+ # "TotalCoinsFreeFloat" => "N/A",
261
+ # "SortOrder" => "1",
262
+ # "Sponsored" => false
263
+ # },
264
+ # "ETH" => {
265
+ # "Id" => "7605",
266
+ # "Url" => "/coins/eth/overview",
267
+ # "ImageUrl" => "/media/20646/eth_logo.png",
268
+ # "Name" => "ETH",
269
+ # "Symbol" => "ETH",
270
+ # "CoinName" => "Ethereum ",
271
+ # "FullName" => "Ethereum (ETH)",
272
+ # "Algorithm" => "Ethash",
273
+ # "ProofType" => "PoW",
274
+ # "FullyPremined" => "0",
275
+ # "TotalCoinSupply" => "0",
276
+ # "PreMinedValue" => "N/A",
277
+ # "TotalCoinsFreeFloat" => "N/A",
278
+ # "SortOrder" => "2",
279
+ # "Sponsored" => false
280
+ # },
281
+ # ...
282
+ # },
283
+ # "Type" => 100
284
+ # }
285
+ ```
286
+
229
287
  ### CoinSnapshot
230
288
 
231
289
  Get data for a currency pair. It returns general block explorer information, aggregated data and individual data for each exchange available.
@@ -298,21 +356,21 @@ Find top pairs by trading volume for a given currency.
298
356
  ```ruby
299
357
  Cryptocompare::TopPairs.find('ETH')
300
358
  # => {
301
- # Response: "Success",
302
- # Data: [
359
+ # "Response" => "Success",
360
+ # "Data" => [
303
361
  # {
304
- # exchange: "CCCAGG",
305
- # fromSymbol: "ETH",
306
- # toSymbol: "USD",
307
- # volume24h: 1310705.3005027298,
308
- # volume24hTo: 288031723.3503975
362
+ # "exchange" => "CCCAGG",
363
+ # "fromSymbol" => "ETH",
364
+ # "toSymbol" => "USD",
365
+ # "volume24h" => 1310705.3005027298,
366
+ # "volume24hTo" => 288031723.3503975
309
367
  # },
310
368
  # {
311
- # exchange: "CCCAGG",
312
- # fromSymbol: "ETH",
313
- # toSymbol: "BTC",
314
- # volume24h: 978200.2198323006,
315
- # volume24hTo: 77883.06190085363
369
+ # "exchange" => "CCCAGG",
370
+ # "fromSymbol" => "ETH",
371
+ # "toSymbol" => "BTC",
372
+ # "volume24h" => 978200.2198323006,
373
+ # "volume24hTo" => 77883.06190085363
316
374
  # },
317
375
  # ...
318
376
  # ]
@@ -330,36 +388,36 @@ Find historical data by minute for BTC to USD.
330
388
  ```ruby
331
389
  Cryptocompare::HistoMinute.find('BTC', 'USD')
332
390
  # => {
333
- # Response: "Success",
334
- # Type: 100,
335
- # Aggregated: true,
336
- # Data: [
391
+ # "Response" => "Success",
392
+ # "Type" => 100,
393
+ # "Aggregated" => true,
394
+ # "Data" => [
337
395
  # {
338
- # time: 1502259120,
339
- # close: 3396.44,
340
- # high: 3397.63,
341
- # low: 3396.34,
342
- # open: 3397.39,
343
- # volumefrom: 98.2,
344
- # volumeto: 335485
396
+ # "time" => 1502259120,
397
+ # "close" => 3396.44,
398
+ # "high" => 3397.63,
399
+ # "low" => 3396.34,
400
+ # "open" => 3397.39,
401
+ # "volumefrom" => 98.2,
402
+ # "volumeto" => 335485
345
403
  # },
346
404
  # {
347
- # time: 1502259300,
348
- # close: 3396.86,
349
- # high: 3396.94,
350
- # low: 3396.44,
351
- # open: 3396.44,
352
- # volumefrom: 16.581031,
353
- # volumeto: 56637.869999999995
405
+ # "time" => 1502259300,
406
+ # "close" => 3396.86,
407
+ # "high" => 3396.94,
408
+ # "low" => 3396.44,
409
+ # "open" => 3396.44,
410
+ # "volumefrom" => 16.581031,
411
+ # "volumeto" => 56637.869999999995
354
412
  # },
355
413
  # ...
356
414
  # ],
357
- # TimeTo: 1502259360,
358
- # TimeFrom: 1502259120,
359
- # FirstValueInArray: true,
360
- # ConversionType: {
361
- # type: "direct",
362
- # conversionSymbol: ""
415
+ # "TimeTo" => 1502259360,
416
+ # "TimeFrom" => 1502259120,
417
+ # "FirstValueInArray" => true,
418
+ # "ConversionType" => {
419
+ # "type" => "direct",
420
+ # "conversionSymbol" => ""
363
421
  # }
364
422
  # }
365
423
  ```
@@ -375,36 +433,36 @@ Find historical data by hour for BTC to USD.
375
433
  ```ruby
376
434
  Cryptocompare::HistoHour.find('BTC', 'USD')
377
435
  # => {
378
- # Response: "Success",
379
- # Type: 100,
380
- # Aggregated: false,
381
- # Data: [
436
+ # "Response" => "Success",
437
+ # "Type" => 100,
438
+ # "Aggregated" => false,
439
+ # "Data" => [
382
440
  # {
383
- # time: 1502259120,
384
- # close: 3396.44,
385
- # high: 3397.63,
386
- # low: 3396.34,
387
- # open: 3397.39,
388
- # volumefrom: 98.2,
389
- # volumeto: 335485
441
+ # "time" => 1502259120,
442
+ # "close" => 3396.44,
443
+ # "high" => 3397.63,
444
+ # "low" => 3396.34,
445
+ # "open" => 3397.39,
446
+ # "volumefrom" => 98.2,
447
+ # "volumeto" => 335485
390
448
  # },
391
449
  # {
392
- # time: 1502259300,
393
- # close: 3396.86,
394
- # high: 3396.94,
395
- # low: 3396.44,
396
- # open: 3396.44,
397
- # volumefrom: 16.581031,
398
- # volumeto: 56637.869999999995
450
+ # "time" => 1502259300,
451
+ # "close" => 3396.86,
452
+ # "high" => 3396.94,
453
+ # "low" => 3396.44,
454
+ # "open" => 3396.44,
455
+ # "volumefrom" => 16.581031,
456
+ # "volumeto" => 56637.869999999995
399
457
  # },
400
458
  # ...
401
459
  # ],
402
- # TimeTo: 1503248400,
403
- # TimeFrom: 1502643600,
404
- # FirstValueInArray: true,
405
- # ConversionType: {
406
- # type: "direct",
407
- # conversionSymbol: ""
460
+ # "TimeTo" => 1503248400,
461
+ # "TimeFrom" => 1502643600,
462
+ # "FirstValueInArray" => true,
463
+ # "ConversionType" => {
464
+ # "type" => "direct",
465
+ # "conversionSymbol" => ""
408
466
  # }
409
467
  # }
410
468
  ```
@@ -420,97 +478,229 @@ Find historical data by day for BTC to USD.
420
478
  ```ruby
421
479
  Cryptocompare::HistoDay.find('BTC', 'USD')
422
480
  # => {
423
- # Response: "Success",
424
- # Type: 100,
425
- # Aggregated: false,
426
- # Data: [
481
+ # "Response" => "Success",
482
+ # "Type" => 100,
483
+ # "Aggregated" => false,
484
+ # "Data" => [
427
485
  # {
428
- # time: 1500854400,
429
- # close: 2763.42,
430
- # high: 2798.89,
431
- # low: 2715.69,
432
- # open: 2756.61,
433
- # volumefrom: 83009.25,
434
- # volumeto: 229047365.02
486
+ # "time" => 1500854400,
487
+ # "close" => 2763.42,
488
+ # "high" => 2798.89,
489
+ # "low" => 2715.69,
490
+ # "open" => 2756.61,
491
+ # "volumefrom" => 83009.25,
492
+ # "volumeto" => 229047365.02
435
493
  # },
436
494
  # {
437
- # time: 1500940800,
438
- # close: 2582.58,
439
- # high: 2779.08,
440
- # low: 2472.62,
441
- # open: 2763.42,
442
- # volumefrom: 205883.15,
443
- # volumeto: 534765380.75
495
+ # "time" => 1500940800,
496
+ # "close" => 2582.58,
497
+ # "high" => 2779.08,
498
+ # "low" => 2472.62,
499
+ # "open" => 2763.42,
500
+ # "volumefrom" => 205883.15,
501
+ # "volumeto" => 534765380.75
444
502
  # },
445
503
  # ...
446
504
  # ],
447
- # TimeTo: 1503446400,
448
- # TimeFrom: 1500854400,
449
- # FirstValueInArray: true,
450
- # ConversionType: {
451
- # type: "direct",
452
- # conversionSymbol: ""
505
+ # "TimeTo" => 1503446400,
506
+ # "TimeFrom" => 1500854400,
507
+ # "FirstValueInArray" => true,
508
+ # "ConversionType" => {
509
+ # "type" => "direct",
510
+ # "conversionSymbol" => ""
453
511
  # }
454
512
  # }
455
513
  ```
456
514
 
515
+ ## News
516
+ Get news articles from the providers that CryptoCompare has integrated with as well as news provider data.
517
+
518
+ **Example:**
519
+
520
+ Get news articles from the providers that CryptoCompare has integrated with.
521
+
522
+ ```ruby
523
+ Cryptocompare::News.all
524
+ # => [
525
+ # {
526
+ # "id" => "85721",
527
+ # "guid" => "https://news.bitcoin.com/?p=127153",
528
+ # "published_on" => 1520834400,
529
+ # "imageurl" => "https://images.cryptocompare.com/news/bitcoin.com/b9MBw3g640c.jpeg",
530
+ # "title" => "Study Finds $3B Worth of Faked Cryptocurrency Volumes and Wash Trades",
531
+ # "url" => "https://news.bitcoin.com/study-finds-3b-worth-of-faked-cryptocurrency-volumes-and-wash-trades/",
532
+ # "source" => "bitcoin.com",
533
+ # "body" => "On March 10 a cryptocurrency trader and researcher published a report on how he believes $3 billion worth of cryptocurrency trade volumes, primarily from a couple of exchanges, are concocted. The author of the study, Sylvain Ribes, alleges that the exchange Okcoin has been fabricating up to 93 percent of its trade volumes. Also read: Thailand [&#8 230;]The post Study Finds $3B Worth of Faked Cryptocurrency Volumes and Wash Trades appeared first on Bitcoin News.",
534
+ # "tags" => "News|95%|altcoin exchange|Binance|Bitcoin|BTC|Coinmarketcap|Fake Trades|GDAX|Huobi|illiquid assets|Kraken|Liquidity|Livecoinwatch|N-Featured|OKcoin|Okex|Poloniex|Sylvain Ribes|trading|Volumes|Wash Trades|Zhao Changpeng",
535
+ # "categories" => "BTC|Exchange|Trading",
536
+ # "lang" => "EN",
537
+ # "source_info" => {
538
+ # "name" => "Bitcoin.com",
539
+ # "lang" => "EN",
540
+ # "img" => "https://images.cryptocompare.com/news/default/bitcoincom.png"
541
+ # }
542
+ # },
543
+ # ...
544
+ # ]
545
+ ```
546
+
547
+ **Example:**
548
+
549
+ Get all the news providers that CryptoCompare has integrated with.
550
+
551
+ ```ruby
552
+ Cryptocompare::News.providers
553
+ # => [
554
+ # {
555
+ # "key" => "cryptocompare",
556
+ # "name" => "CryptoCompare",
557
+ # "lang" => "EN",
558
+ # "img" => "https://images.cryptocompare.com/news/default/cryptocompare.png"
559
+ # },
560
+ # {
561
+ # "key" => "coindesk",
562
+ # "name" => "CoinDesk",
563
+ # "lang" => "EN",
564
+ # "img" => "https://images.cryptocompare.com/news/default/coindesk.png"
565
+ # },
566
+ # {
567
+ # "key" => "bitcoinmagazine",
568
+ # "name" => "Bitcoin Magazine",
569
+ # "lang" => "EN",
570
+ # "img" => "https://images.cryptocompare.com/news/default/bitcoinmagazine.png"
571
+ # },
572
+ # {
573
+ # "key" => "yahoofinance",
574
+ # "name" => "Yahoo Finance Bitcoin",
575
+ # "lang" => "EN",
576
+ # "img" => "https://images.cryptocompare.com/news/default/yahoofinance.png"
577
+ # },
578
+ # ...
579
+ # ]
580
+ ```
581
+
582
+ ### Exchanges
583
+ Get exchange data, such as cryptocurrencies that each exchange offers, and the supported conversion cryptocurrencies.
584
+
585
+ **Examples:**
586
+
587
+ Get info for all exchanges.
588
+
589
+ ```ruby
590
+ Cryptocompare::Exchanges.all
591
+ # => {
592
+ # "Coinbase" => [
593
+ # {
594
+ # "LTC" => [
595
+ # "BTC",
596
+ # "USD",
597
+ # "EUR"
598
+ # ],
599
+ # "ETH" => [
600
+ # "BTC",
601
+ # "USD",
602
+ # "EUR"
603
+ # ],
604
+ # "BCH" => [
605
+ # "USD"
606
+ # ],
607
+ # "BTC" => [
608
+ # "USD",
609
+ # "GBP",
610
+ # "EUR",
611
+ # "CAD"
612
+ # ]
613
+ # },
614
+ # ],
615
+ # ...
616
+ # }
617
+ ```
618
+
457
619
  ## Supported Exchanges
458
620
 
459
- * BTC38
460
- * BTCC
461
- * BTCE
462
- * BTCMarkets
463
- * BTCXIndia
464
- * BTER
621
+ * Abucoins
622
+ * ANXBTC
623
+ * Binance
465
624
  * Bit2C
466
625
  * BitBay
626
+ * BitcoinDE
627
+ * Bitfinex
467
628
  * bitFlyer
468
629
  * bitFlyerFX
630
+ * Bithumb
469
631
  * BitMarket
470
- * BitSquare
471
- * Bitfinex
472
632
  * Bitso
633
+ * BitSquare
473
634
  * Bitstamp
474
635
  * Bittrex
475
636
  * Bleutrade
637
+ * BTC38
638
+ * BTCChina
639
+ * BTCE
640
+ * BTCMarkets
641
+ * btcXchange
642
+ * BTCXIndia
643
+ * BTER
644
+ * BXinth
476
645
  * CCEDK
646
+ * CCEX
477
647
  * Cexio
478
- * CoinCheck
648
+ * CHBTC
479
649
  * Coinbase
650
+ * CoinCheck
651
+ * CoinExchange
480
652
  * Coinfloor
481
653
  * Coinone
654
+ * Coinroom
482
655
  * Coinse
483
656
  * Coinsetter
484
657
  * Cryptopia
658
+ * CryptoX
485
659
  * Cryptsy
486
660
  * EtherDelta
487
661
  * EthexIndia
662
+ * Exmo
663
+ * EXX
488
664
  * Gatecoin
665
+ * Gateio
489
666
  * Gemini
490
667
  * HitBTC
491
668
  * Huobi
669
+ * HuobiPro
492
670
  * itBit
671
+ * Jubi
493
672
  * Korbit
494
673
  * Kraken
674
+ * Kucoin
495
675
  * LakeBTC
496
676
  * Liqui
497
677
  * LiveCoin
498
678
  * LocalBitcoins
499
679
  * Luno
680
+ * Lykke
500
681
  * MercadoBitcoin
501
682
  * MonetaGo
683
+ * MtGox
684
+ * Novaexchange
502
685
  * OKCoin
686
+ * OKEX
503
687
  * Paymium
504
688
  * Poloniex
505
689
  * QuadrigaCX
506
690
  * Quoine
691
+ * Remitano
507
692
  * TheRockTrading
508
693
  * Tidex
694
+ * TrustDEX
695
+ * TuxExchange
509
696
  * Unocoin
510
697
  * Vaultoro
698
+ * ViaBTC
699
+ * WavesDEX
511
700
  * Yacuna
512
701
  * Yobit
513
702
  * Yunbi
703
+ * Zaif
514
704
 
515
705
  If no exchange option is specified, then the default 'CCCAGG' is used. This is cryptocompare's aggregated data.
516
706