cryptocompare 0.12.0 → 0.16.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: fd4320f3979560ae4c08a6f8abf95627c495a1be
4
- data.tar.gz: 5837a3365785a0ef52c7eebb2d115812351f0712
2
+ SHA256:
3
+ metadata.gz: 166dd1bd0cc845936ec9c3384a819baf73fc3af511aa78c667d769a8952db08f
4
+ data.tar.gz: c124ae57e1b17cd6021c9c10a994b0ad43945e0dff86b22f4a848b112bcf060d
5
5
  SHA512:
6
- metadata.gz: 6aa4d3f5a38c53f0a39ca3a7fe10d7db19c0114b27d6cc909a13919588fa3d55dcdb9c0891d331ac3efe16b09488620c4c0315af969304e20c6671ce5c087bec
7
- data.tar.gz: 25edeb8e6cac2d810509144ccbb56daba584f7f5cd031e66343c16dba088f0e3c5b4db7721aa15cea5c580b5bdbd771aa96ea33e8abc8d0d374b875dffa7258d
6
+ metadata.gz: 94f5b790558eeddc79ab4d16c1d36faddab1002401be5896a35ee9a9c268580d6bd8ec0358d45ce2f003e781033ee29fdc325c66845bbbca2004ccef93fd8700
7
+ data.tar.gz: 7a3ba4957c8dcefc66bfa6192f2d8f24af0ae67d40d7f7626ca92518084ce72f51348ddfa48fff05fca3044495293d8d74fa53eefaaba3317c3bcfe057e879a7
@@ -0,0 +1,33 @@
1
+ # Use the latest 2.1 version of CircleCI pipeline process engine.
2
+ # See: https://circleci.com/docs/2.0/configuration-reference
3
+ version: 2.1
4
+
5
+ # Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
6
+ # See: https://circleci.com/docs/2.0/orb-intro/
7
+ orbs:
8
+ ruby: circleci/ruby@1.2.0
9
+
10
+ # Define a job to be invoked later in a workflow.
11
+ # See: https://circleci.com/docs/2.0/configuration-reference/#jobs
12
+ jobs:
13
+ build:
14
+ docker:
15
+ - image: 'cimg/base:stable'
16
+ steps:
17
+ - checkout
18
+ - ruby/install:
19
+ version: '2.7'
20
+ - run: echo "Ruby 2.7 has been installed"
21
+ - ruby/install-deps:
22
+ bundler-version: '2.2.31'
23
+ with-cache: false
24
+ - run:
25
+ command: 'bundle exec rake test'
26
+ name: Run Tests
27
+ # Invoke jobs via workflows
28
+ # See: https://circleci.com/docs/2.0/configuration-reference/#workflows
29
+ workflows:
30
+ sample: # This is the name of the workflow, feel free to change it to better match your workflow.
31
+ # Inside the workflow, you define the jobs you want to run.
32
+ jobs:
33
+ - build
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/Gemfile.lock ADDED
@@ -0,0 +1,71 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cryptocompare (0.16.0)
5
+ faraday
6
+ json
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.8.0)
12
+ public_suffix (>= 2.0.2, < 5.0)
13
+ codeclimate-test-reporter (1.0.9)
14
+ simplecov (<= 0.13)
15
+ crack (0.4.5)
16
+ rexml
17
+ docile (1.1.5)
18
+ faraday (1.8.0)
19
+ faraday-em_http (~> 1.0)
20
+ faraday-em_synchrony (~> 1.0)
21
+ faraday-excon (~> 1.1)
22
+ faraday-httpclient (~> 1.0.1)
23
+ faraday-net_http (~> 1.0)
24
+ faraday-net_http_persistent (~> 1.1)
25
+ faraday-patron (~> 1.0)
26
+ faraday-rack (~> 1.0)
27
+ multipart-post (>= 1.2, < 3)
28
+ ruby2_keywords (>= 0.0.4)
29
+ faraday-em_http (1.0.0)
30
+ faraday-em_synchrony (1.0.0)
31
+ faraday-excon (1.1.0)
32
+ faraday-httpclient (1.0.1)
33
+ faraday-net_http (1.0.1)
34
+ faraday-net_http_persistent (1.2.0)
35
+ faraday-patron (1.0.0)
36
+ faraday-rack (1.0.0)
37
+ hashdiff (1.0.1)
38
+ json (2.6.1)
39
+ minitest (5.14.4)
40
+ multipart-post (2.1.1)
41
+ public_suffix (4.0.6)
42
+ rake (13.0.6)
43
+ rexml (3.2.5)
44
+ ruby2_keywords (0.0.5)
45
+ simplecov (0.13.0)
46
+ docile (~> 1.1.0)
47
+ json (>= 1.8, < 3)
48
+ simplecov-html (~> 0.10.0)
49
+ simplecov-html (0.10.2)
50
+ vcr (6.0.0)
51
+ webmock (3.14.0)
52
+ addressable (>= 2.8.0)
53
+ crack (>= 0.3.2)
54
+ hashdiff (>= 0.4.0, < 2.0.0)
55
+
56
+ PLATFORMS
57
+ x86_64-darwin-19
58
+ x86_64-linux
59
+
60
+ DEPENDENCIES
61
+ bundler (~> 2.2.0)
62
+ codeclimate-test-reporter (~> 1.0.0)
63
+ cryptocompare!
64
+ minitest (~> 5.0)
65
+ rake (>= 12.3.3)
66
+ simplecov
67
+ vcr
68
+ webmock
69
+
70
+ BUNDLED WITH
71
+ 2.2.31
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # cryptocompare
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/cryptocompare.svg)](http://badge.fury.io/rb/cryptocompare) [![Build Status](https://travis-ci.org/alexanderdavidpan/cryptocompare.svg)](https://travis-ci.org/alexanderdavidpan/cryptocompare)
3
+ [![Gem Version](https://badge.fury.io/rb/cryptocompare.svg)](http://badge.fury.io/rb/cryptocompare) [![CircleCI](https://circleci.com/gh/alexanderdavidpan/cryptocompare.svg?style=shield)](https://circleci.com/gh/alexanderdavidpan/cryptocompare)
4
4
  [![Test Coverage](https://codeclimate.com/github/alexanderdavidpan/cryptocompare/badges/coverage.svg)](https://codeclimate.com/github/alexanderdavidpan/cryptocompare/coverage)
5
5
 
6
6
  This is a Ruby gem that utilizes the CryptoCompare API to fetch data related to cryptocurrencies.
@@ -29,6 +29,15 @@ To use cryptocompare, just require it like so:
29
29
  require 'cryptocompare'
30
30
  ```
31
31
 
32
+ ### API Keys
33
+
34
+ Some requests will require an API key. In order to obtain an API key, you will need to request one from Cryptocompare. You can then pass it in as an optional parameter in the any Cryptocompare module method like so:
35
+
36
+ ```ruby
37
+ Cryptocompare::Price.find('ETH', 'USD', { api_key: 'API_KEY' })
38
+ # => {"ETH"=>{"USD"=>4714.16}}
39
+ ```
40
+
32
41
  ### Price
33
42
 
34
43
  Finds the currency price(s) of a given currency symbol. Really fast, 20-60 ms. Cached each 10 seconds.
@@ -512,83 +521,421 @@ Cryptocompare::HistoDay.find('BTC', 'USD')
512
521
  # }
513
522
  ```
514
523
 
524
+ ## News
525
+ Get news articles from the providers that CryptoCompare has integrated with as well as news provider data.
526
+
527
+ **Example:**
528
+
529
+ Get news articles from the providers that CryptoCompare has integrated with.
530
+
531
+ ```ruby
532
+ Cryptocompare::News.all
533
+ # => [
534
+ # {
535
+ # "id" => "85721",
536
+ # "guid" => "https://news.bitcoin.com/?p=127153",
537
+ # "published_on" => 1520834400,
538
+ # "imageurl" => "https://images.cryptocompare.com/news/bitcoin.com/b9MBw3g640c.jpeg",
539
+ # "title" => "Study Finds $3B Worth of Faked Cryptocurrency Volumes and Wash Trades",
540
+ # "url" => "https://news.bitcoin.com/study-finds-3b-worth-of-faked-cryptocurrency-volumes-and-wash-trades/",
541
+ # "source" => "bitcoin.com",
542
+ # "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.",
543
+ # "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",
544
+ # "categories" => "BTC|Exchange|Trading",
545
+ # "lang" => "EN",
546
+ # "source_info" => {
547
+ # "name" => "Bitcoin.com",
548
+ # "lang" => "EN",
549
+ # "img" => "https://images.cryptocompare.com/news/default/bitcoincom.png"
550
+ # }
551
+ # },
552
+ # ...
553
+ # ]
554
+ ```
555
+
556
+ **Example:**
557
+
558
+ Get all the news providers that CryptoCompare has integrated with.
559
+
560
+ ```ruby
561
+ Cryptocompare::News.providers
562
+ # => [
563
+ # {
564
+ # "key" => "cryptocompare",
565
+ # "name" => "CryptoCompare",
566
+ # "lang" => "EN",
567
+ # "img" => "https://images.cryptocompare.com/news/default/cryptocompare.png"
568
+ # },
569
+ # {
570
+ # "key" => "coindesk",
571
+ # "name" => "CoinDesk",
572
+ # "lang" => "EN",
573
+ # "img" => "https://images.cryptocompare.com/news/default/coindesk.png"
574
+ # },
575
+ # {
576
+ # "key" => "bitcoinmagazine",
577
+ # "name" => "Bitcoin Magazine",
578
+ # "lang" => "EN",
579
+ # "img" => "https://images.cryptocompare.com/news/default/bitcoinmagazine.png"
580
+ # },
581
+ # {
582
+ # "key" => "yahoofinance",
583
+ # "name" => "Yahoo Finance Bitcoin",
584
+ # "lang" => "EN",
585
+ # "img" => "https://images.cryptocompare.com/news/default/yahoofinance.png"
586
+ # },
587
+ # ...
588
+ # ]
589
+ ```
590
+
591
+ ### Exchanges
592
+ Get exchange data, such as cryptocurrencies that each exchange offers, and the supported conversion cryptocurrencies.
593
+
594
+ **Examples:**
595
+
596
+ Get info for all exchanges.
597
+
598
+ ```ruby
599
+ Cryptocompare::Exchanges.all
600
+ # => {
601
+ # "Coinbase" => [
602
+ # {
603
+ # "LTC" => [
604
+ # "BTC",
605
+ # "USD",
606
+ # "EUR"
607
+ # ],
608
+ # "ETH" => [
609
+ # "BTC",
610
+ # "USD",
611
+ # "EUR"
612
+ # ],
613
+ # "BCH" => [
614
+ # "USD"
615
+ # ],
616
+ # "BTC" => [
617
+ # "USD",
618
+ # "GBP",
619
+ # "EUR",
620
+ # "CAD"
621
+ # ]
622
+ # },
623
+ # ],
624
+ # ...
625
+ # }
626
+ ```
627
+
515
628
  ## Supported Exchanges
516
629
 
517
- * ANXBTC
630
+ * aax
631
+ * ABCC
632
+ * Abucoins
633
+ * ACX
634
+ * AidosMarket
635
+ * aliexchange
636
+ * alphaex
637
+ * altilly
638
+ * ataix
639
+ * bcbitcoin
640
+ * BCEX
641
+ * beldex
642
+ * bequant
643
+ * betconix
644
+ * Bgogo
645
+ * bhex
646
+ * Bibox
647
+ * BigONE
648
+ * biki
649
+ * bilaxy
518
650
  * Binance
651
+ * binancedex
652
+ * Binanceje
653
+ * binanceusa
654
+ * bingcoins
519
655
  * Bit2C
656
+ * bitasset
657
+ * BitBank
520
658
  * BitBay
521
- * BitcoinDE
659
+ * bitbuy
660
+ * bitci
661
+ * bitcoincom
662
+ * BitexBook
663
+ * bitfex
522
664
  * Bitfinex
665
+ * BitFlip
523
666
  * bitFlyer
667
+ * bitflyereu
524
668
  * bitFlyerFX
669
+ * bitflyerus
670
+ * Bitforex
671
+ * BitGrail
525
672
  * Bithumb
673
+ * bithumbglobal
674
+ * Bitinfi
675
+ * Bitkub
676
+ * Bitlish
526
677
  * BitMarket
678
+ * BitMart
679
+ * bitmax
680
+ * Bitmex
681
+ * bitpanda
682
+ * Bitpoint
683
+ * Bitsane
684
+ * Bitshares
527
685
  * Bitso
686
+ * bitspark
528
687
  * BitSquare
529
688
  * Bitstamp
530
- * Bittrex
689
+ * BitTrex
690
+ * BitZ
691
+ * bkex
692
+ * Blackturtle
531
693
  * Bleutrade
694
+ * blockchaincom
695
+ * Bluebelt
696
+ * Braziliex
532
697
  * BTC38
698
+ * BTCAlpha
699
+ * BTCBOX
533
700
  * BTCChina
534
701
  * BTCE
702
+ * BTCExchange
535
703
  * BTCMarkets
704
+ * btcmex
705
+ * BTCTurk
536
706
  * btcXchange
537
707
  * BTCXIndia
538
708
  * BTER
709
+ * btse
710
+ * Buda
711
+ * bw
712
+ * BXinth
713
+ * bybit
714
+ * Catex
715
+ * CBX
716
+ * CCCAGG
539
717
  * CCEDK
540
718
  * CCEX
541
719
  * Cexio
720
+ * chainrift
721
+ * chainx
722
+ * chaoex
542
723
  * CHBTC
724
+ * ChileBit
725
+ * cobinhood
726
+ * Codex
727
+ * coinall
543
728
  * Coinbase
544
- * CoinCheck
545
- * CoinExchange
729
+ * CoinBene
730
+ * Coincap
731
+ * Coincheck
732
+ * CoinCorner
733
+ * CoinDeal
734
+ * coineal
735
+ * coinegg
736
+ * CoinEx
737
+ * CoinFalcon
738
+ * coinfield
546
739
  * Coinfloor
740
+ * CoinHub
741
+ * CoinJar
742
+ * Coinmate
743
+ * Coinnest
547
744
  * Coinone
745
+ * CoinPulse
548
746
  * Coinroom
747
+ * CoinsBank
748
+ * Coinsbit
549
749
  * Coinse
550
750
  * Coinsetter
751
+ * coinspro
752
+ * coinsuper
753
+ * CoinTiger
754
+ * coinzest
755
+ * compound
756
+ * coss
757
+ * crex24
758
+ * crosstower
759
+ * Cryptagio
760
+ * CryptoBulls
761
+ * CryptoCarbon
762
+ * cryptodotcom
763
+ * CryptoExchangeWS
764
+ * cryptofacilities
765
+ * cryptonex
766
+ * Cryptonit
551
767
  * Cryptopia
552
768
  * CryptoX
553
769
  * Cryptsy
770
+ * currency
771
+ * curve
772
+ * darbfinance
773
+ * dcoin
774
+ * DDEX
775
+ * decoin
776
+ * deribit
777
+ * DEx
778
+ * DigiFinex
779
+ * DSX
780
+ * e55com
781
+ * eidoo
782
+ * equos
783
+ * erisx
554
784
  * EtherDelta
785
+ * Ethermium
555
786
  * EthexIndia
787
+ * Ethfinex
788
+ * etoro
789
+ * Everbloom
790
+ * Exenium
556
791
  * Exmo
792
+ * EXRATES
793
+ * exscudo
794
+ * ExtStock
795
+ * EXX
796
+ * fatbtc
797
+ * FCCE
798
+ * FCoin
799
+ * Foxbit
800
+ * ftx
801
+ * ftxus
557
802
  * Gatecoin
803
+ * Gateio
558
804
  * Gemini
805
+ * Globitex
806
+ * Gneiss
807
+ * Gnosis
808
+ * gopax
809
+ * Graviex
810
+ * HADAX
811
+ * hbus
812
+ * Hikenex
559
813
  * HitBTC
560
814
  * Huobi
815
+ * huobifutures
816
+ * huobijapan
817
+ * huobikorea
818
+ * HuobiPro
819
+ * iCoinbay
820
+ * IDAX
821
+ * idevex
822
+ * IDEX
823
+ * Incorex
824
+ * IndependentReserve
825
+ * indodax
826
+ * InstantBitex
827
+ * IQFinex
828
+ * Ironex
561
829
  * itBit
562
830
  * Jubi
563
831
  * Korbit
564
832
  * Kraken
833
+ * Kucoin
834
+ * Kuna
565
835
  * LakeBTC
836
+ * LAToken
837
+ * LBank
838
+ * Liqnet
566
839
  * Liqui
840
+ * Liquid
567
841
  * LiveCoin
842
+ * lmax
568
843
  * LocalBitcoins
569
844
  * Luno
570
845
  * Lykke
571
846
  * MercadoBitcoin
847
+ * Minebit
572
848
  * MonetaGo
573
849
  * MtGox
850
+ * NDAX
851
+ * Nebula
852
+ * Neraex
853
+ * Nexchange
854
+ * Nlexch
855
+ * nominex
574
856
  * Novaexchange
857
+ * Nuex
858
+ * oex
575
859
  * OKCoin
860
+ * OKEX
861
+ * onederx
862
+ * oneinch
863
+ * OpenLedger
864
+ * Ore
865
+ * P2PB2B
866
+ * pancakeswap
867
+ * paribu
576
868
  * Paymium
577
869
  * Poloniex
870
+ * primexbt
871
+ * probit
872
+ * Qryptos
578
873
  * QuadrigaCX
874
+ * quickswap
579
875
  * Quoine
876
+ * raidofinance
580
877
  * Remitano
878
+ * RightBTC
879
+ * SafeCoin
880
+ * safetrade
881
+ * seedcx
882
+ * sigenp2p
883
+ * sigenpro
884
+ * Simex
885
+ * SingularityX
886
+ * sistemkoin
887
+ * slicex
888
+ * smartrade
889
+ * StocksExchange
890
+ * StocksExchangeio
891
+ * Surbitcoin
892
+ * sushiswap
893
+ * Switcheo
894
+ * tchapp
895
+ * TDAX
581
896
  * TheRockTrading
897
+ * thore
898
+ * Threexbit
582
899
  * Tidex
900
+ * timex
901
+ * Tokenomy
902
+ * tokensnet
903
+ * TokenStore
904
+ * tokok
905
+ * TradeSatoshi
906
+ * TrustDEX
907
+ * trxmarket
583
908
  * TuxExchange
909
+ * uniswap
910
+ * uniswapv2
911
+ * uniswapv3
912
+ * unnamed
584
913
  * Unocoin
914
+ * Upbit
915
+ * utorg
916
+ * valr
585
917
  * Vaultoro
918
+ * VBTC
919
+ * Velox
586
920
  * ViaBTC
587
921
  * WavesDEX
922
+ * wbb
923
+ * WEX
924
+ * WorldCryptoCap
925
+ * xbtpro
926
+ * xcoex
927
+ * xena
928
+ * XS2
929
+ * xtpub
588
930
  * Yacuna
589
931
  * Yobit
590
932
  * Yunbi
591
933
  * Zaif
934
+ * ZB
935
+ * ZBG
936
+ * zebitex
937
+ * Zecoex
938
+ * zloadr
592
939
 
593
940
  If no exchange option is specified, then the default 'CCCAGG' is used. This is cryptocompare's aggregated data.
594
941
 
@@ -12,3 +12,4 @@ to_syms: tsyms
12
12
  to_ts: toTs
13
13
  ts: ts
14
14
  utc_offset: UTCHourDiff
15
+ api_key: api_key
@@ -13,8 +13,8 @@ Gem::Specification.new do |spec|
13
13
  spec.description = %q{A Ruby gem for communicating with the CryptoCompare API}
14
14
  spec.homepage = "https://github.com/alexanderdavidpan/cryptocompare"
15
15
  spec.license = "MIT"
16
-
17
- spec.required_ruby_version = '>= 2.0.0'
16
+
17
+ spec.required_ruby_version = '>= 2.3.0'
18
18
 
19
19
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
20
20
  # to allow pushing to a single host or delete this section to allow pushing to any host.
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_development_dependency "bundler", "~> 1.12"
33
- spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "bundler", "~> 2.2.0"
33
+ spec.add_development_dependency "rake", ">= 12.3.3"
34
34
  spec.add_development_dependency "minitest", "~> 5.0"
35
35
  spec.add_development_dependency "vcr"
36
36
  spec.add_development_dependency "webmock"
@@ -0,0 +1,53 @@
1
+ require 'faraday'
2
+ require 'json'
3
+
4
+ module Cryptocompare
5
+ module Exchanges
6
+ API_URL = 'https://min-api.cryptocompare.com/data/all/exchanges'
7
+
8
+ # Get exchange data, such as cryptocurrencies that each exchange offers, and
9
+ # the supported conversion cryptocurrencies.
10
+ #
11
+ # ==== Returns
12
+ #
13
+ # [Hash] Hash of exchanges, cryptocurrencies that each exchange offers, and
14
+ # the supported conversion cryptocurrencies.
15
+ #
16
+ # ==== Example
17
+ #
18
+ # Get info for all exchanges.
19
+ #
20
+ # Cryptocompare::Exchanges.all
21
+ #
22
+ # Sample response
23
+ #
24
+ # {
25
+ # "Coinbase" => {
26
+ # "LTC" => [
27
+ # "BTC",
28
+ # "USD",
29
+ # "EUR"
30
+ # ],
31
+ # "ETH" => [
32
+ # "BTC",
33
+ # "USD",
34
+ # "EUR"
35
+ # ],
36
+ # "BTC" => [
37
+ # "USD",
38
+ # "GBP",
39
+ # "EUR",
40
+ # "CAD"
41
+ # ],
42
+ # "BCH" => [
43
+ # "USD"
44
+ # ]
45
+ # },
46
+ # ...
47
+ # }
48
+ def self.all
49
+ api_resp = Faraday.get(API_URL)
50
+ JSON.parse(api_resp.body)
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,97 @@
1
+ require 'faraday'
2
+ require 'json'
3
+
4
+ module Cryptocompare
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'
8
+
9
+ # Returns news articles from the providers that CryptoCompare has integrated
10
+ # with.
11
+ #
12
+ # ==== Returns
13
+ #
14
+ # [Array] Array of news article objects.
15
+ #
16
+ # ==== Example
17
+ #
18
+ # Get news articles from the providers that CryptoCompare has integrated
19
+ # with.
20
+ #
21
+ # Cryptocompare::News.all
22
+ #
23
+ # Sample response
24
+ #
25
+ # [
26
+ # {
27
+ # "id" => "85721",
28
+ # "guid" => "https://news.bitcoin.com/?p=127153",
29
+ # "published_on" => 1520834400,
30
+ # "imageurl" => "https://images.cryptocompare.com/news/bitcoin.com/b9MBw3g640c.jpeg",
31
+ # "title" => "Study Finds $3B Worth of Faked Cryptocurrency Volumes and Wash Trades",
32
+ # "url" => "https://news.bitcoin.com/study-finds-3b-worth-of-faked-cryptocurrency-volumes-and-wash-trades/",
33
+ # "source" => "bitcoin.com",
34
+ # "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.",
35
+ # "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",
36
+ # "categories" => "BTC|Exchange|Trading",
37
+ # "lang" => "EN",
38
+ # "source_info" => {
39
+ # "name" => "Bitcoin.com",
40
+ # "lang" => "EN",
41
+ # "img" => "https://images.cryptocompare.com/news/default/bitcoincom.png"
42
+ # }
43
+ # },
44
+ # ...
45
+ # ]
46
+ def self.all
47
+ api_resp = Faraday.get(NEWS_API_URL)
48
+ JSON.parse(api_resp.body)
49
+ end
50
+
51
+ # Returns all the news providers that CryptoCompare has integrated with.
52
+ #
53
+ # ==== Returns
54
+ #
55
+ # [Array] Array of news provider objects.
56
+ #
57
+ # ==== Example
58
+ #
59
+ # Get all the news providers that CryptoCompare has integrated with.
60
+ #
61
+ # Cryptocompare::News.providers
62
+ #
63
+ # Sample response
64
+ #
65
+ # [
66
+ # {
67
+ # "key" => "cryptocompare",
68
+ # "name" => "CryptoCompare",
69
+ # "lang" => "EN",
70
+ # "img" => "https://images.cryptocompare.com/news/default/cryptocompare.png"
71
+ # },
72
+ # {
73
+ # "key" => "coindesk",
74
+ # "name" => "CoinDesk",
75
+ # "lang" => "EN",
76
+ # "img" => "https://images.cryptocompare.com/news/default/coindesk.png"
77
+ # },
78
+ # {
79
+ # "key" => "bitcoinmagazine",
80
+ # "name" => "Bitcoin Magazine",
81
+ # "lang" => "EN",
82
+ # "img" => "https://images.cryptocompare.com/news/default/bitcoinmagazine.png"
83
+ # },
84
+ # {
85
+ # "key" => "yahoofinance",
86
+ # "name" => "Yahoo Finance Bitcoin",
87
+ # "lang" => "EN",
88
+ # "img" => "https://images.cryptocompare.com/news/default/yahoofinance.png"
89
+ # },
90
+ # ...
91
+ # ]
92
+ def self.providers
93
+ api_resp = Faraday.get(NEWS_PROVIDERS_API_URL)
94
+ JSON.parse(api_resp.body)
95
+ end
96
+ end
97
+ end
@@ -1,3 +1,3 @@
1
1
  module Cryptocompare
2
- VERSION = "0.12.0"
2
+ VERSION = "0.16.0"
3
3
  end
data/lib/cryptocompare.rb CHANGED
@@ -1,9 +1,11 @@
1
1
  require_relative "cryptocompare/version"
2
2
  require_relative "cryptocompare/coin_list"
3
3
  require_relative "cryptocompare/coin_snapshot"
4
+ require_relative "cryptocompare/exchanges"
4
5
  require_relative "cryptocompare/histo_day"
5
6
  require_relative "cryptocompare/histo_hour"
6
7
  require_relative "cryptocompare/histo_minute"
8
+ require_relative "cryptocompare/news"
7
9
  require_relative "cryptocompare/price"
8
10
  require_relative "cryptocompare/price_historical"
9
11
  require_relative "cryptocompare/helpers/query_param_helper"
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.12.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander David Pan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-13 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.12'
19
+ version: 2.2.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.12'
26
+ version: 2.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 12.3.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 12.3.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -115,10 +115,11 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - ".circleci/config.yml"
118
119
  - ".gitignore"
119
- - ".travis.yml"
120
120
  - CODE_OF_CONDUCT.md
121
121
  - Gemfile
122
+ - Gemfile.lock
122
123
  - LICENSE.txt
123
124
  - README.md
124
125
  - Rakefile
@@ -129,10 +130,12 @@ files:
129
130
  - lib/cryptocompare.rb
130
131
  - lib/cryptocompare/coin_list.rb
131
132
  - lib/cryptocompare/coin_snapshot.rb
133
+ - lib/cryptocompare/exchanges.rb
132
134
  - lib/cryptocompare/helpers/query_param_helper.rb
133
135
  - lib/cryptocompare/histo_day.rb
134
136
  - lib/cryptocompare/histo_hour.rb
135
137
  - lib/cryptocompare/histo_minute.rb
138
+ - lib/cryptocompare/news.rb
136
139
  - lib/cryptocompare/price.rb
137
140
  - lib/cryptocompare/price_historical.rb
138
141
  - lib/cryptocompare/top_pairs.rb
@@ -142,7 +145,7 @@ licenses:
142
145
  - MIT
143
146
  metadata:
144
147
  allowed_push_host: https://rubygems.org
145
- post_install_message:
148
+ post_install_message:
146
149
  rdoc_options: []
147
150
  require_paths:
148
151
  - lib
@@ -150,16 +153,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
150
153
  requirements:
151
154
  - - ">="
152
155
  - !ruby/object:Gem::Version
153
- version: 2.0.0
156
+ version: 2.3.0
154
157
  required_rubygems_version: !ruby/object:Gem::Requirement
155
158
  requirements:
156
159
  - - ">="
157
160
  - !ruby/object:Gem::Version
158
161
  version: '0'
159
162
  requirements: []
160
- rubyforge_project:
161
- rubygems_version: 2.6.14
162
- signing_key:
163
+ rubygems_version: 3.1.2
164
+ signing_key:
163
165
  specification_version: 4
164
166
  summary: A Ruby gem for communicating with the CryptoCompare API
165
167
  test_files: []
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.0.0
5
- before_install: gem install bundler -v 1.12.5
6
- addons:
7
- code_climate:
8
- repo_token:
9
- secure: "NAjO10wrSWlyrTC+hj+4Mk3ORZqr7yoD4Or8HIj7YkpKX4l9neqiaOCmNi34wImpJttEsbH/ICIfqphjp1w7VEdS/HnVcJEv3mO9fJ3uLYXJY9uTlwlotdHQ5xCIpyQQJswRw1ef2kH55ACZOWcfC/Sp7sZ9L/xb/3Gb9o1hC6pH0Kd87gx4X8v/THfynR5tPoXUjWCN1RZDcshdTBqOLIyMBdlueZQ2bmiqPQEtCorixCSF2z0oxBXlNoklkPVGOqPXiER/KFaUmDTupSnWw9CGO/00CA1ErU2pk4LTSQwDTZbMQ6ciIl3JTaM9YtJhaKVw2qrSAEKBFjUVmSlqblwAr/A47MaNxD7B6gWe5aKjt1aPsWddNJDf43SSb4B4yh8FfA++c+ydB3XN1yEgg4eoKrqezIgffzbETGGIrlKkbEVqYzXeS3d8N2Zn/ads7Ie1QQsGaH858r+2Taser/saYqF/KIJwMOIiOAAriGJxIk70hHM5ocJVNVtyJpWOTZ1Tzoqtgayfk3lLLixzenh+HRoOLtXg4lCXOZJ+R78w9NCIG/y5ltJJqW9lXlajJHGlIvdkGKD9Q3MKAuH4UbUw6Ni12T8HigEcf1DdDGahNcL2vUdDeIF+mAGTl0blBiLnjmaj+KsfpwC0LcIVBHeLVPV48r2eld6LaNgFeT4="
10
- # regular test configuration
11
- after_success:
12
- - bundle exec codeclimate-test-reporter