cryptocompare 0.12.0 → 0.13.0
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 +4 -4
- data/README.md +45 -0
- data/lib/cryptocompare.rb +1 -0
- data/lib/cryptocompare/exchanges.rb +53 -0
- data/lib/cryptocompare/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa21dd8a62b76ee16cc74571716557f97929fbf0
|
4
|
+
data.tar.gz: ef06d7fee31527c7786c809098fde9976194081f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41b88ba0309ffbba536dbbdfa590f759acb72dbb178af838faf00f845b2bfad0a02c9635fcd1e4db7e5249ea5813f76f12ea4f78f08f73405e54d39c587334e7
|
7
|
+
data.tar.gz: ef93438e5d9ff1c2f239ae5e2c5d960b80af4305c21d05dfbc7bbd299597d709ced0dd7bc3d490721d9f8572b09e345508e167626cc4ad4a4c14675b5780d155
|
data/README.md
CHANGED
@@ -512,8 +512,46 @@ Cryptocompare::HistoDay.find('BTC', 'USD')
|
|
512
512
|
# }
|
513
513
|
```
|
514
514
|
|
515
|
+
### Exchanges
|
516
|
+
Get exchange data, such as cryptocurrencies that each exchange offers, and the supported conversion cryptocurrencies.
|
517
|
+
|
518
|
+
**Examples:**
|
519
|
+
|
520
|
+
Get info for all exchanges.
|
521
|
+
|
522
|
+
```ruby
|
523
|
+
Cryptocompare::Exchanges.all
|
524
|
+
# => {
|
525
|
+
# "Coinbase" => [
|
526
|
+
# {
|
527
|
+
# "LTC" => [
|
528
|
+
# "BTC",
|
529
|
+
# "USD",
|
530
|
+
# "EUR"
|
531
|
+
# ],
|
532
|
+
# "ETH" => [
|
533
|
+
# "BTC",
|
534
|
+
# "USD",
|
535
|
+
# "EUR"
|
536
|
+
# ],
|
537
|
+
# "BCH" => [
|
538
|
+
# "USD"
|
539
|
+
# ],
|
540
|
+
# "BTC" => [
|
541
|
+
# "USD",
|
542
|
+
# "GBP",
|
543
|
+
# "EUR",
|
544
|
+
# "CAD"
|
545
|
+
# ]
|
546
|
+
# },
|
547
|
+
# ],
|
548
|
+
# ...
|
549
|
+
# }
|
550
|
+
```
|
551
|
+
|
515
552
|
## Supported Exchanges
|
516
553
|
|
554
|
+
* Abucoins
|
517
555
|
* ANXBTC
|
518
556
|
* Binance
|
519
557
|
* Bit2C
|
@@ -536,6 +574,7 @@ Cryptocompare::HistoDay.find('BTC', 'USD')
|
|
536
574
|
* btcXchange
|
537
575
|
* BTCXIndia
|
538
576
|
* BTER
|
577
|
+
* BXinth
|
539
578
|
* CCEDK
|
540
579
|
* CCEX
|
541
580
|
* Cexio
|
@@ -554,14 +593,18 @@ Cryptocompare::HistoDay.find('BTC', 'USD')
|
|
554
593
|
* EtherDelta
|
555
594
|
* EthexIndia
|
556
595
|
* Exmo
|
596
|
+
* EXX
|
557
597
|
* Gatecoin
|
598
|
+
* Gateio
|
558
599
|
* Gemini
|
559
600
|
* HitBTC
|
560
601
|
* Huobi
|
602
|
+
* HuobiPro
|
561
603
|
* itBit
|
562
604
|
* Jubi
|
563
605
|
* Korbit
|
564
606
|
* Kraken
|
607
|
+
* Kucoin
|
565
608
|
* LakeBTC
|
566
609
|
* Liqui
|
567
610
|
* LiveCoin
|
@@ -573,6 +616,7 @@ Cryptocompare::HistoDay.find('BTC', 'USD')
|
|
573
616
|
* MtGox
|
574
617
|
* Novaexchange
|
575
618
|
* OKCoin
|
619
|
+
* OKEX
|
576
620
|
* Paymium
|
577
621
|
* Poloniex
|
578
622
|
* QuadrigaCX
|
@@ -580,6 +624,7 @@ Cryptocompare::HistoDay.find('BTC', 'USD')
|
|
580
624
|
* Remitano
|
581
625
|
* TheRockTrading
|
582
626
|
* Tidex
|
627
|
+
* TrustDEX
|
583
628
|
* TuxExchange
|
584
629
|
* Unocoin
|
585
630
|
* Vaultoro
|
data/lib/cryptocompare.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
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"
|
@@ -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
|
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.
|
4
|
+
version: 0.13.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:
|
11
|
+
date: 2018-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- lib/cryptocompare.rb
|
130
130
|
- lib/cryptocompare/coin_list.rb
|
131
131
|
- lib/cryptocompare/coin_snapshot.rb
|
132
|
+
- lib/cryptocompare/exchanges.rb
|
132
133
|
- lib/cryptocompare/helpers/query_param_helper.rb
|
133
134
|
- lib/cryptocompare/histo_day.rb
|
134
135
|
- lib/cryptocompare/histo_hour.rb
|