kucoin_ruby 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 67e19f0be53ac1708b91f2f9c181cc19e76d291b
4
- data.tar.gz: 45160284006711933369a8047655461f4689e8e1
3
+ metadata.gz: 55eb3a4c2c53a3a8cd46709db0d54b7d5e3b30f3
4
+ data.tar.gz: 8d765865afc5c848511af4a3407aec12e836d88e
5
5
  SHA512:
6
- metadata.gz: 1e559e10698c4a41fafdf6010f7a464c2a43b38073e8a4f4aaa36184650bba9f68fe9483291895d6c9eec6332a13fda882c41149ec99fb80bdca9e52216e1a9f
7
- data.tar.gz: 230c0280806ae13e13697b480152a4ace549e8dd5ed90840bb8ff408ebbbbd4398e479d96d1413baff1f318421d8449ec4d385702712c62d8e201d64e41ae44d
6
+ metadata.gz: a66a7200650d28cb4d92196fbbc17da424306d737967ddaa32e051524bc9c20cebe45526f3a46e8ed70c28493d1259fcf18bbec0c9a7a518ef210a7753f0b617
7
+ data.tar.gz: 2ac5465c7e06bf2a80e0b228ffe769a8a2812853f3eb60dcfb5154710f964bb42f3cb6d7fabb4f9e07df7ff12eb4fbb945c2971eae3dd9b01fa17b340f3f18fa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.1.6
2
+
3
+ ### Changed
4
+
5
+ - Make Trading methods as class methods
6
+ - Make Market methods as class methods
7
+
1
8
  ## 0.1.5
2
9
 
3
10
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kucoin_ruby (0.1.5)
4
+ kucoin_ruby (0.1.6)
5
5
  addressable
6
6
  httparty
7
7
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <h1 align="center">KuCoin API Client</h1>
2
2
 
3
3
  <p align="center">
4
- A Ruby client for the [KuCoin](https://www.kucoin.com/) API.
4
+ A Ruby client for the [KuCoin](https://www.kucoin.com/#/?r=E57fFl) API.
5
5
  </p>
6
6
 
7
7
  ## Overview
@@ -1,60 +1,60 @@
1
1
  module KucoinRuby
2
2
  module Market
3
- def tick(symbol = nil)
3
+ def self.tick(symbol = nil)
4
4
  endpoint = "/v1/open/tick"
5
5
  endpoint += "?symbol=#{symbol}" if symbol
6
6
  KucoinRuby::Net.get(endpoint)
7
7
  end
8
8
 
9
- def orders(symbol)
9
+ def self.orders(symbol)
10
10
  KucoinRuby::Net.get("/v1/open/orders?symbol=#{symbol}")
11
11
  end
12
12
 
13
- def buy_orders(symbol, group, limit)
13
+ def self.buy_orders(symbol, group, limit)
14
14
  endpoint = "/v1/open/orders-buy?symbol=#{symbol}&group=#{group}&limit=#{limit}"
15
15
  KucoinRuby::Net.get(endpoint)
16
16
  end
17
17
 
18
- def sell_orders(symbol, group, limit)
18
+ def self.sell_orders(symbol, group, limit)
19
19
  endpoint = "/v1/open/orders-sell?symbol=#{symbol}&group=#{group}&limit=#{limit}"
20
20
  KucoinRuby::Net.get(endpoint)
21
21
  end
22
22
 
23
- def recent_deal_orders(symbol, limit, since)
23
+ def self.recent_deal_orders(symbol, limit, since)
24
24
  endpoint = "/v1/open/deal-orders?symbol=#{symbol}&synce=#{synce}&limit=#{limit}"
25
25
  KucoinRuby::Net.get(endpoint)
26
26
  end
27
27
 
28
- def trading_symbols
28
+ def self.trading_symbols
29
29
  KucoinRuby::Net.get('/v1/market/open/symbols')
30
30
  end
31
31
 
32
- def trending_symbols
32
+ def self.trending_symbols
33
33
  KucoinRuby::Net.get('/v1/market/open/coins-trending')
34
34
  end
35
35
 
36
- def kline_data(symbol, type, from, to, limit)
36
+ def self.kline_data(symbol, type, from, to, limit)
37
37
  KucoinRuby::Net.get("/v1/open/kline?symbol=#{symbol}&type=#{type}&from=#{from}&to=#{to}&limit=#{limit}")
38
38
  end
39
39
 
40
- def kline_config()
40
+ def self.kline_config()
41
41
  KucoinRuby::Net.get('/v1/open/chart/config')
42
42
  end
43
43
 
44
- def chart_symbol(symbol)
44
+ def self.chart_symbol(symbol)
45
45
  KucoinRuby::Net.get("/v1/open/chart/symbol?symbol=#{symbol}")
46
46
  end
47
47
 
48
- def history_kline_data(symbol, resolution, from, to)
48
+ def self.history_kline_data(symbol, resolution, from, to)
49
49
  endpoint = "/v1/open/chart/history?symbol=#{symbol}&resolution=#{resolution}&from=#{from}&to=#{to}"
50
50
  KucoinRuby::Net.get(endpoint)
51
51
  end
52
52
 
53
- def coin_info(coin)
53
+ def self.coin_info(coin)
54
54
  KucoinRuby::Net.get("/v1/market/open/coin-info?coin=#{coin}")
55
55
  end
56
56
 
57
- def coins
57
+ def self.coins
58
58
  KucoinRuby::Net.get("/v1/market/open/coins")
59
59
  end
60
60
  end
@@ -1,30 +1,30 @@
1
1
  module KucoinRuby
2
2
  module Trading
3
- def create_order(symbol, type, price, amount)
3
+ def self.create_order(symbol, type, price, amount)
4
4
  endpoint = '/v1/order'
5
5
  payload = {symbol: symbol, type: type, price: price, amount: amount}
6
6
  KucoinRuby::Net.signed_post(endpoint, payload)
7
7
  end
8
8
 
9
- def active_orders(symbol = nil)
9
+ def self.active_orders(symbol = nil)
10
10
  endpoint = '/v1/order/active'
11
11
  query_string = {symbol: symbol}
12
12
  KucoinRuby::Net.signed_get(endpoint, query_string)
13
13
  end
14
14
 
15
- def cancel_order(symbol, order_id, type)
15
+ def self.cancel_order(symbol, order_id, type)
16
16
  endpoint = '/v1/cancel-order'
17
17
  payload = {symbol: symbol, type: type, order_id: order_id}
18
18
  KucoinRuby::Net.signed_post(endpoint, payload)
19
19
  end
20
20
 
21
- def dealt_orders(symbol, type, limit, page, since, before)
21
+ def self.dealt_orders(symbol, type, limit, page, since, before)
22
22
  endpoint = '/v1/order/dealt'
23
23
  query_string = {before: before, limit: limit, page: page, since: since, symbol: symbol, type: type}
24
24
  KucoinRuby::Net.signed_get(endpoint, query_string)
25
25
  end
26
26
 
27
- def symbol_dealt_order(symbol, type, limit, page )
27
+ def self.symbol_dealt_order(symbol, type, limit, page )
28
28
  endpoint = '/v1/deal-orders'
29
29
  query_string = {limit: limit, page: page, symbol: symbol, type: type}
30
30
  KucoinRuby::Net.signed_get(endpoint, query_string)
@@ -1,3 +1,3 @@
1
1
  module KucoinRuby
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kucoin_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - lalo