cryptoexchange 0.3.4 → 0.4.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 +2 -2
- data/lib/cryptoexchange/exchanges/anx/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/anx/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/bitcoin_indonesia/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/bitcoin_indonesia/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/bitfinex/market.rb +8 -0
- data/lib/cryptoexchange/exchanges/bitfinex/services/market.rb +38 -0
- data/lib/cryptoexchange/exchanges/bitfinex/services/pairs.rb +27 -0
- data/lib/cryptoexchange/exchanges/bitflyer/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/bitflyer/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/bithumb/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/bithumb/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/bitstamp/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/bitstamp/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/bittrex/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/bittrex/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/bleutrade/services/market.rb +2 -2
- data/lib/cryptoexchange/exchanges/bleutrade/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/btcc/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/btcc/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/bter/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/bter/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/ccex/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/ccex/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/coin_exchange/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/coin_exchange/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/coincheck/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/coincheck/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/coinone/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/coinone/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/cryptopia/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/cryptopia/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/ether_delta/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/ether_delta/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/gatecoin/services/market.rb +2 -2
- data/lib/cryptoexchange/exchanges/gatecoin/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/gemini/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/gemini/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/hitbtc/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/hitbtc/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/korbit/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/korbit/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/kraken/market.rb +8 -0
- data/lib/cryptoexchange/exchanges/kraken/services/market.rb +46 -0
- data/lib/cryptoexchange/exchanges/kraken/services/pairs.rb +27 -0
- data/lib/cryptoexchange/exchanges/lakebtc/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/lakebtc/services/pairs.rb +2 -2
- data/lib/cryptoexchange/exchanges/liqui/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/liqui/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/livecoin/services/market.rb +2 -2
- data/lib/cryptoexchange/exchanges/livecoin/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/novaexchange/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/novaexchange/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/okcoin/services/market.rb +1 -1
- data/lib/cryptoexchange/exchanges/okcoin/services/pairs.rb +1 -1
- data/lib/cryptoexchange/exchanges/quoine/services/market.rb +2 -2
- data/lib/cryptoexchange/exchanges/quoine/services/pairs.rb +1 -1
- data/lib/cryptoexchange/version.rb +1 -1
- metadata +8 -52
- data/lib/cryptoexchange/exchanges/anx/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/anx/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/bitcoin_indonesia/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/bitcoin_indonesia/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/bitflyer/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/bitflyer/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/bithumb/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/bithumb/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/bitstamp/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/bitstamp/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/bittrex/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/bittrex/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/bleutrade/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/bleutrade/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/btcc/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/btcc/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/bter/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/bter/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/ccex/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/ccex/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/coin_exchange/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/coin_exchange/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/coincheck/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/coincheck/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/coinone/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/coinone/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/cryptopia/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/cryptopia/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/ether_delta/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/ether_delta/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/gatecoin/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/gatecoin/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/gemini/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/gemini/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/hitbtc/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/hitbtc/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/korbit/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/korbit/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/lakebtc/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/lakebtc/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/liqui/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/liqui/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/livecoin/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/livecoin/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/novaexchange/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/novaexchange/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/okcoin/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/okcoin/models/ticker.rb +0 -8
- data/lib/cryptoexchange/exchanges/quoine/models/market_pair.rb +0 -8
- data/lib/cryptoexchange/exchanges/quoine/models/ticker.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4d08d974d4145bf2068ed0056f31bfe9e2c8419
|
4
|
+
data.tar.gz: fc0e014ad4cbdb93d1f84f1b409f2e0279844538
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f6e9330b3c3d3acfc3afb9210e71d853e63d47663121baf2b61ffb7308f3cc2143c61aa3a51d40ab5d0ffc299f20007925f678f28a611c60720617ce53b22cc
|
7
|
+
data.tar.gz: 5d55cd4bf6cc41d3c969617b558db0bf3f1a84e23e0e0f76e89cd9737bd0a650279a6a3f74d54e6ea0cc7fe4afa51b9775dfb8d7e36bed58abf73d7b8813df7c
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ Or install it yourself as:
|
|
37
37
|
| Bittrex | Y | | | | Y |
|
38
38
|
| GDAX | | | | | |
|
39
39
|
| Gemini | Y | | | | Y |
|
40
|
-
| Kraken |
|
40
|
+
| Kraken | Y | | | | Y |
|
41
41
|
| Poloniex | | | | | |
|
42
42
|
| Coincheck | Y | | | | User-Defined|
|
43
43
|
| Bitflyer | Y | | | | Y |
|
@@ -51,7 +51,7 @@ Or install it yourself as:
|
|
51
51
|
| BTC-e | | | | | |
|
52
52
|
| Bleutrade | Y | | | | Y |
|
53
53
|
| Yobit | | | | | |
|
54
|
-
| Bitfinex |
|
54
|
+
| Bitfinex | Y | | | | Y |
|
55
55
|
| BTER | Y | | | | Y |
|
56
56
|
| Cryptopia | Y | | | | Y |
|
57
57
|
| Livecoin | Y | | | | Y |
|
@@ -11,7 +11,7 @@ module Cryptoexchange::Exchanges
|
|
11
11
|
def adapt(output)
|
12
12
|
market_pairs = []
|
13
13
|
output.each do |pair|
|
14
|
-
market_pairs <<
|
14
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
15
15
|
base: pair[:base],
|
16
16
|
target: pair[:target],
|
17
17
|
market: Anx::Market::NAME
|
@@ -21,7 +21,7 @@ module Cryptoexchange::Exchanges
|
|
21
21
|
|
22
22
|
def adapt(output, market_pair)
|
23
23
|
output = output['ticker']
|
24
|
-
ticker =
|
24
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
25
25
|
ticker.base = market_pair.base
|
26
26
|
ticker.target = market_pair.target
|
27
27
|
ticker.market = BitcoinIndonesia::Market::NAME
|
@@ -11,7 +11,7 @@ module Cryptoexchange::Exchanges
|
|
11
11
|
def adapt(output)
|
12
12
|
market_pairs = []
|
13
13
|
output.each do |pair|
|
14
|
-
market_pairs <<
|
14
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
15
15
|
base: pair[:base],
|
16
16
|
target: pair[:target],
|
17
17
|
market: BitcoinIndonesia::Market::NAME
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Cryptoexchange::Exchanges
|
2
|
+
module Bitfinex
|
3
|
+
module Services
|
4
|
+
class Market < Cryptoexchange::Services::Market
|
5
|
+
class << self
|
6
|
+
def supports_individual_ticker_query?
|
7
|
+
true
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def fetch(market_pair)
|
12
|
+
output = super(ticker_url(market_pair))
|
13
|
+
adapt(output, market_pair)
|
14
|
+
end
|
15
|
+
|
16
|
+
def ticker_url(market_pair)
|
17
|
+
"#{Cryptoexchange::Exchanges::Bitfinex::Market::API_URL}/pubticker/#{market_pair.base}#{market_pair.target}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def adapt(output, market_pair)
|
21
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
22
|
+
ticker.base = market_pair.base
|
23
|
+
ticker.target = market_pair.target
|
24
|
+
ticker.market = Bitfinex::Market::NAME
|
25
|
+
ticker.ask = NumericHelper.to_d(output['ask'])
|
26
|
+
ticker.bid = NumericHelper.to_d(output['bid'])
|
27
|
+
ticker.last = NumericHelper.to_d(output['last_price'])
|
28
|
+
ticker.high = NumericHelper.to_d(output['high'])
|
29
|
+
ticker.low = NumericHelper.to_d(output['low'])
|
30
|
+
ticker.volume = NumericHelper.to_d(output['volume'])
|
31
|
+
ticker.timestamp = output['timestamp'].to_i
|
32
|
+
ticker.payload = output
|
33
|
+
ticker
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Cryptoexchange::Exchanges
|
2
|
+
module Bitfinex
|
3
|
+
module Services
|
4
|
+
class Pairs < Cryptoexchange::Services::Pairs
|
5
|
+
PAIRS_URL = "#{Cryptoexchange::Exchanges::Bitfinex::Market::API_URL}/symbols"
|
6
|
+
|
7
|
+
|
8
|
+
def fetch
|
9
|
+
output = super
|
10
|
+
adapt(output)
|
11
|
+
end
|
12
|
+
|
13
|
+
def adapt(output)
|
14
|
+
market_pairs = []
|
15
|
+
output.each do |pair|
|
16
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
17
|
+
base: pair[0..2],
|
18
|
+
target: pair[3..-1],
|
19
|
+
market: Bitfinex::Market::NAME
|
20
|
+
)
|
21
|
+
end
|
22
|
+
market_pairs
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -17,7 +17,7 @@ module Cryptoexchange::Exchanges
|
|
17
17
|
|
18
18
|
if product_code =~ /\A[A-Z]{3}_[A-Z]{3}\z/
|
19
19
|
base, target = product_code.split('_')
|
20
|
-
market_pairs <<
|
20
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
21
21
|
base: base,
|
22
22
|
target: target,
|
23
23
|
market: Bitflyer::Market::NAME
|
@@ -19,7 +19,7 @@ module Cryptoexchange::Exchanges
|
|
19
19
|
|
20
20
|
def adapt(output, market_pair)
|
21
21
|
market = output['data']
|
22
|
-
ticker =
|
22
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
23
23
|
ticker.base = market_pair.base
|
24
24
|
ticker.target = market_pair.target
|
25
25
|
ticker.market = Bithumb::Market::NAME
|
@@ -11,7 +11,7 @@ module Cryptoexchange::Exchanges
|
|
11
11
|
def adapt(output)
|
12
12
|
market_pairs = []
|
13
13
|
output.each do |pair|
|
14
|
-
market_pairs <<
|
14
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
15
15
|
base: pair[:base],
|
16
16
|
target: pair[:target],
|
17
17
|
market: Bithumb::Market::NAME
|
@@ -20,7 +20,7 @@ module Cryptoexchange::Exchanges
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def adapt(output, market_pair)
|
23
|
-
ticker =
|
23
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
24
24
|
ticker.base = market_pair.base
|
25
25
|
ticker.target = market_pair.target
|
26
26
|
ticker.market = Bitstamp::Market::NAME
|
@@ -11,7 +11,7 @@ module Cryptoexchange::Exchanges
|
|
11
11
|
def adapt(output)
|
12
12
|
market_pairs = []
|
13
13
|
output.each do |pair|
|
14
|
-
market_pairs <<
|
14
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
15
15
|
base: pair[:base],
|
16
16
|
target: pair[:target],
|
17
17
|
market: Bitstamp::Market::NAME
|
@@ -13,7 +13,7 @@ module Cryptoexchange::Exchanges
|
|
13
13
|
pairs = output['result']
|
14
14
|
market_pairs = []
|
15
15
|
pairs.each do |pair|
|
16
|
-
market_pairs <<
|
16
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
17
17
|
base: pair['BaseCurrency'],
|
18
18
|
target: pair['MarketCurrency'],
|
19
19
|
market: Bittrex::Market::NAME
|
@@ -20,7 +20,7 @@ module Cryptoexchange::Exchanges
|
|
20
20
|
def adapt_all(output)
|
21
21
|
output['result'].map do |ticker|
|
22
22
|
currency_pair = ticker['MarketName'].split("_")
|
23
|
-
market_pair = Cryptoexchange::
|
23
|
+
market_pair = Cryptoexchange::Models::MarketPair.new(
|
24
24
|
base: currency_pair[1],
|
25
25
|
target: currency_pair[0],
|
26
26
|
market: Bleutrade::Market::NAME
|
@@ -30,7 +30,7 @@ module Cryptoexchange::Exchanges
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def adapt(output, market_pair)
|
33
|
-
ticker =
|
33
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
34
34
|
ticker.base = market_pair.base
|
35
35
|
ticker.target = market_pair.target
|
36
36
|
ticker.market = Bleutrade::Market::NAME
|
@@ -13,7 +13,7 @@ module Cryptoexchange::Exchanges
|
|
13
13
|
def adapt(output)
|
14
14
|
market_pairs = []
|
15
15
|
output['result'].each do |pair|
|
16
|
-
market_pairs <<
|
16
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
17
17
|
base: pair['BaseCurrency'],
|
18
18
|
target: pair['MarketCurrency'],
|
19
19
|
market: Bleutrade::Market::NAME
|
@@ -22,7 +22,7 @@ module Cryptoexchange::Exchanges
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def adapt(output, market_pair)
|
25
|
-
ticker =
|
25
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
26
26
|
ticker.base = market_pair.base
|
27
27
|
ticker.target = market_pair.target
|
28
28
|
ticker.market = Btcc::Market::NAME
|
@@ -11,7 +11,7 @@ module Cryptoexchange::Exchanges
|
|
11
11
|
def adapt(output)
|
12
12
|
market_pairs = []
|
13
13
|
output.each do |pair|
|
14
|
-
market_pairs <<
|
14
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
15
15
|
base: pair[:base],
|
16
16
|
target: pair[:target],
|
17
17
|
market: Btcc::Market::NAME
|
@@ -18,7 +18,7 @@ module Cryptoexchange::Exchanges
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def adapt(output, market_pair)
|
21
|
-
ticker =
|
21
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
22
22
|
ticker.base = market_pair.base
|
23
23
|
ticker.target = market_pair.target
|
24
24
|
ticker.market = Bter::Market::NAME
|
@@ -28,7 +28,7 @@ module Cryptoexchange::Exchanges
|
|
28
28
|
market = ticker_output['ticker']
|
29
29
|
volume = HashHelper.dig(volumes_output, 'ticker', market_pair.base.downcase, 'vol')
|
30
30
|
|
31
|
-
ticker
|
31
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
32
32
|
ticker.base = market_pair.base
|
33
33
|
ticker.target = market_pair.target
|
34
34
|
ticker.market = Ccex::Market::NAME
|
@@ -32,7 +32,7 @@ module Cryptoexchange::Exchanges
|
|
32
32
|
def adapt(output, market_pair)
|
33
33
|
market = output['result']
|
34
34
|
|
35
|
-
ticker =
|
35
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
36
36
|
ticker.base = market_pair.base
|
37
37
|
ticker.target = market_pair.target
|
38
38
|
ticker.market = CoinExchange::Market::NAME
|
@@ -11,7 +11,7 @@ module Cryptoexchange::Exchanges
|
|
11
11
|
|
12
12
|
def adapt(output)
|
13
13
|
output['result'].map do |market|
|
14
|
-
|
14
|
+
Cryptoexchange::Models::MarketPair.new({
|
15
15
|
base: market['MarketAssetCode'],
|
16
16
|
target: market['BaseCurrencyCode'],
|
17
17
|
market: CoinExchange::Market::NAME
|
@@ -11,7 +11,7 @@ module Cryptoexchange::Exchanges
|
|
11
11
|
def adapt(output)
|
12
12
|
market_pairs = []
|
13
13
|
output.each do |pair|
|
14
|
-
market_pairs <<
|
14
|
+
market_pairs << Cryptoexchange::Models::MarketPair.new(
|
15
15
|
base: pair[:base],
|
16
16
|
target: pair[:target],
|
17
17
|
market: Coincheck::Market::NAME
|
@@ -13,7 +13,7 @@ module Cryptoexchange::Exchanges
|
|
13
13
|
market_pairs = []
|
14
14
|
output.each do |_, value|
|
15
15
|
next unless value.is_a? Hash
|
16
|
-
market_pair =
|
16
|
+
market_pair = Cryptoexchange::Models::MarketPair.new
|
17
17
|
market_pair.base = value['currency']
|
18
18
|
market_pair.target = 'krw'
|
19
19
|
market_pair.market = Coinone::Market::NAME
|
@@ -23,7 +23,7 @@ module Cryptoexchange::Exchanges
|
|
23
23
|
data = output['Data']
|
24
24
|
base, target = data['Label'].split('/')
|
25
25
|
|
26
|
-
ticker =
|
26
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
27
27
|
ticker.base = base
|
28
28
|
ticker.target = target
|
29
29
|
ticker.market = Cryptopia::Market::NAME
|
@@ -14,7 +14,7 @@ module Cryptoexchange::Exchanges
|
|
14
14
|
market_pairs = []
|
15
15
|
pairs.each do |pair|
|
16
16
|
base, target = pair['Label'].split('/')
|
17
|
-
market_pair =
|
17
|
+
market_pair = Cryptoexchange::Models::MarketPair.new
|
18
18
|
market_pair.base = base
|
19
19
|
market_pair.target = target
|
20
20
|
market_pair.market = Cryptopia::Market::NAME
|
@@ -23,7 +23,7 @@ module Cryptoexchange::Exchanges
|
|
23
23
|
name = "#{market_pair.base}_#{market_pair.target}"
|
24
24
|
market = output[name]
|
25
25
|
|
26
|
-
ticker =
|
26
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
27
27
|
ticker.base = market_pair.base
|
28
28
|
ticker.target = market_pair.target
|
29
29
|
ticker.market = EtherDelta::Market::NAME
|
@@ -20,7 +20,7 @@ module Cryptoexchange::Exchanges
|
|
20
20
|
def adapt_all(output)
|
21
21
|
output['tickers'].map do |ticker|
|
22
22
|
currency_pair = ticker['currencyPair']
|
23
|
-
market_pair = Cryptoexchange::
|
23
|
+
market_pair = Cryptoexchange::Models::MarketPair.new(
|
24
24
|
base: currency_pair[0..2],
|
25
25
|
target: currency_pair[3..-1],
|
26
26
|
market: Gatecoin::Market::NAME
|
@@ -30,7 +30,7 @@ module Cryptoexchange::Exchanges
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def adapt(output, market_pair)
|
33
|
-
ticker =
|
33
|
+
ticker = Cryptoexchange::Models::Ticker.new
|
34
34
|
ticker.base = market_pair.base
|
35
35
|
ticker.target = market_pair.target
|
36
36
|
ticker.market = Gatecoin::Market::NAME
|
@@ -17,7 +17,7 @@ module Cryptoexchange::Exchanges
|
|
17
17
|
base = currency_pair[0..2]
|
18
18
|
target = currency_pair[3..-1]
|
19
19
|
|
20
|
-
market_pair =
|
20
|
+
market_pair = Cryptoexchange::Models::MarketPair.new
|
21
21
|
market_pair.base = base
|
22
22
|
market_pair.target = target
|
23
23
|
market_pair.market = Gatecoin::Market::NAME
|