Module: Coinigy::Client::MarketData
- Included in:
- Coinigy::Client
- Defined in:
- lib/coinigy/client/market_data.rb
Overview
Access exchange and market data
Instance Method Summary collapse
-
#data(options = {}) ⇒ Object
Trade history, asks and bids for any supported exchange/market type: Can be 'all', 'history', 'asks', 'bids' or 'orders'.
-
#exchanges ⇒ Object
Returns a list of all supported exchanges.
-
#markets(id = nil) ⇒ Object
Returns a list of markets on specified exchange.
-
#ticker(options = {}) ⇒ Object
Returns last, high (24h), low (24h), ask, bid for specified market.
Instance Method Details
#data(options = {}) ⇒ Object
Trade history, asks and bids for any supported exchange/market type: Can be 'all', 'history', 'asks', 'bids' or 'orders'
17 18 19 |
# File 'lib/coinigy/client/market_data.rb', line 17 def data( = {}) request('data', .slice('exchange_code', 'exchange_market', 'type')) end |
#exchanges ⇒ Object
Returns a list of all supported exchanges
6 7 8 |
# File 'lib/coinigy/client/market_data.rb', line 6 def exchanges request('exchanges') end |
#markets(id = nil) ⇒ Object
Returns a list of markets on specified exchange
11 12 13 |
# File 'lib/coinigy/client/market_data.rb', line 11 def markets(id = nil) request('markets', { exchange_code: id }) end |
#ticker(options = {}) ⇒ Object
Returns last, high (24h), low (24h), ask, bid for specified market
22 23 24 |
# File 'lib/coinigy/client/market_data.rb', line 22 def ticker( = {}) request('ticker', .slice('exchange_code', 'exchange_market')) end |