Module: Kucoin::Rest::Public::Markets
- Included in:
- Client
- Defined in:
- lib/kucoin/rest/public/markets.rb
Instance Method Summary collapse
- #coin_info(coin, options: {}) ⇒ Object
- #coins(options: {}) ⇒ Object
-
#market_symbols(market, options: {}) ⇒ Object
/market/open/symbols is also available, seems to be the same endpoint.
- #markets(options: {}) ⇒ Object
- #trending_symbols(market, options: {}) ⇒ Object
Instance Method Details
#coin_info(coin, options: {}) ⇒ Object
25 26 27 28 |
# File 'lib/kucoin/rest/public/markets.rb', line 25 def coin_info(coin, options: {}) response = parse(get("/market/open/coin-info", params: {coin: coin}, options: ))&.fetch("data", {}) ::Kucoin::Models::Coin.new(response) if response end |
#coins(options: {}) ⇒ Object
20 21 22 23 |
# File 'lib/kucoin/rest/public/markets.rb', line 20 def coins(options: {}) response = parse(get("/market/open/coins", options: ))&.fetch("data", {}) ::Kucoin::Models::Coin.parse(response) if response end |
#market_symbols(market, options: {}) ⇒ Object
/market/open/symbols is also available, seems to be the same endpoint
11 12 13 14 |
# File 'lib/kucoin/rest/public/markets.rb', line 11 def market_symbols(market, options: {}) response = parse(get("/open/symbols", params: {market: market}, options: ))&.fetch("data", {}) ::Kucoin::Models::Ticker.parse(response) if response end |
#markets(options: {}) ⇒ Object
6 7 8 |
# File 'lib/kucoin/rest/public/markets.rb', line 6 def markets(options: {}) parse(get("/open/markets", options: ))&.fetch("data", {}) end |
#trending_symbols(market, options: {}) ⇒ Object
16 17 18 |
# File 'lib/kucoin/rest/public/markets.rb', line 16 def trending_symbols(market, options: {}) response = parse(get("/market/open/coins-trending", params: {market: market}, options: ))&.fetch("data", {}) end |