Module: KucoinRuby::Market
- Defined in:
- lib/kucoin_ruby/market.rb
Class Method Summary collapse
- .buy_orders(symbol, group, limit) ⇒ Object
- .chart_symbol(symbol) ⇒ Object
- .coin_info(coin) ⇒ Object
- .coins ⇒ Object
- .history_kline_data(symbol, resolution, from, to) ⇒ Object
- .kline_config ⇒ Object
- .kline_data(symbol, type, from, to, limit) ⇒ Object
- .orders(symbol) ⇒ Object
- .recent_deal_orders(symbol, limit, since) ⇒ Object
- .sell_orders(symbol, group, limit) ⇒ Object
- .tick(symbol = nil) ⇒ Object
- .trading_symbols ⇒ Object
- .trending_symbols ⇒ Object
Class Method Details
.buy_orders(symbol, group, limit) ⇒ Object
13 14 15 16 |
# File 'lib/kucoin_ruby/market.rb', line 13 def self.buy_orders(symbol, group, limit) endpoint = "/v1/open/orders-buy?symbol=#{symbol}&group=#{group}&limit=#{limit}" KucoinRuby::Net.get(endpoint) end |
.chart_symbol(symbol) ⇒ Object
44 45 46 |
# File 'lib/kucoin_ruby/market.rb', line 44 def self.chart_symbol(symbol) KucoinRuby::Net.get("/v1/open/chart/symbol?symbol=#{symbol}") end |
.coin_info(coin) ⇒ Object
53 54 55 |
# File 'lib/kucoin_ruby/market.rb', line 53 def self.coin_info(coin) KucoinRuby::Net.get("/v1/market/open/coin-info?coin=#{coin}") end |
.coins ⇒ Object
57 58 59 |
# File 'lib/kucoin_ruby/market.rb', line 57 def self.coins KucoinRuby::Net.get("/v1/market/open/coins") end |
.history_kline_data(symbol, resolution, from, to) ⇒ Object
48 49 50 51 |
# File 'lib/kucoin_ruby/market.rb', line 48 def self.history_kline_data(symbol, resolution, from, to) endpoint = "/v1/open/chart/history?symbol=#{symbol}&resolution=#{resolution}&from=#{from}&to=#{to}" KucoinRuby::Net.get(endpoint) end |
.kline_config ⇒ Object
40 41 42 |
# File 'lib/kucoin_ruby/market.rb', line 40 def self.kline_config() KucoinRuby::Net.get('/v1/open/chart/config') end |
.kline_data(symbol, type, from, to, limit) ⇒ Object
36 37 38 |
# File 'lib/kucoin_ruby/market.rb', line 36 def self.kline_data(symbol, type, from, to, limit) KucoinRuby::Net.get("/v1/open/kline?symbol=#{symbol}&type=#{type}&from=#{from}&to=#{to}&limit=#{limit}") end |
.orders(symbol) ⇒ Object
9 10 11 |
# File 'lib/kucoin_ruby/market.rb', line 9 def self.orders(symbol) KucoinRuby::Net.get("/v1/open/orders?symbol=#{symbol}") end |
.recent_deal_orders(symbol, limit, since) ⇒ Object
23 24 25 26 |
# File 'lib/kucoin_ruby/market.rb', line 23 def self.recent_deal_orders(symbol, limit, since) endpoint = "/v1/open/deal-orders?symbol=#{symbol}&synce=#{since}&limit=#{limit}" KucoinRuby::Net.get(endpoint) end |
.sell_orders(symbol, group, limit) ⇒ Object
18 19 20 21 |
# File 'lib/kucoin_ruby/market.rb', line 18 def self.sell_orders(symbol, group, limit) endpoint = "/v1/open/orders-sell?symbol=#{symbol}&group=#{group}&limit=#{limit}" KucoinRuby::Net.get(endpoint) end |
.tick(symbol = nil) ⇒ Object
3 4 5 6 7 |
# File 'lib/kucoin_ruby/market.rb', line 3 def self.tick(symbol = nil) endpoint = "/v1/open/tick" endpoint += "?symbol=#{symbol}" if symbol KucoinRuby::Net.get(endpoint) end |
.trading_symbols ⇒ Object
28 29 30 |
# File 'lib/kucoin_ruby/market.rb', line 28 def self.trading_symbols KucoinRuby::Net.get('/v1/market/open/symbols') end |
.trending_symbols ⇒ Object
32 33 34 |
# File 'lib/kucoin_ruby/market.rb', line 32 def self.trending_symbols KucoinRuby::Net.get('/v1/market/open/coins-trending') end |