Class: Bitex::MarketData
- Inherits:
-
Object
- Object
- Bitex::MarketData
- Defined in:
- lib/bitex/market.rb
Overview
Public market data for a specie, do not use directly, use BitcoinMarketData and LitecoinMarketData instead.
Direct Known Subclasses
Class Method Summary collapse
-
.last_24_hours ⇒ Object
Returns a list of lists with aggregated transaction data for each hour from the last 24 hours.
-
.last_30_days ⇒ Object
Returns a list of lists with aggregated transaction data for each day from the last 30 days.
-
.last_7_days ⇒ Object
Returns a list of lists with aggregated transaction data for each 4 hour period from the last 7 days.
-
.order_book ⇒ Object
The species order book as a Hash with two keys: bids and asks.
-
.ticker ⇒ Object
The species currency ticker conveniently formatted as a ruby Hash with symbolized keys.
-
.transactions ⇒ Object
The species transactions for the past hour as a list of lists, each composed of [unix_timestamp, transaction_id, price, quantity].
Class Method Details
.last_24_hours ⇒ Object
Returns a list of lists with aggregated transaction data for each hour from the last 24 hours.
30 31 32 |
# File 'lib/bitex/market.rb', line 30 def self.last_24_hours api_get('/market/last_24_hours') end |
.last_30_days ⇒ Object
Returns a list of lists with aggregated transaction data for each day from the last 30 days.
44 45 46 |
# File 'lib/bitex/market.rb', line 44 def self.last_30_days api_get('/market/last_30_days') end |
.last_7_days ⇒ Object
Returns a list of lists with aggregated transaction data for each 4 hour period from the last 7 days.
37 38 39 |
# File 'lib/bitex/market.rb', line 37 def self.last_7_days api_get('/market/last_7_days') end |
.order_book ⇒ Object
The species order book as a Hash with two keys: bids and asks. Each of them is a list of list consisting of [price, quantity]
16 17 18 |
# File 'lib/bitex/market.rb', line 16 def self.order_book api_get('/market/order_book').symbolize_keys end |
.ticker ⇒ Object
The species currency ticker conveniently formatted as a ruby Hash with symbolized keys.
9 10 11 |
# File 'lib/bitex/market.rb', line 9 def self.ticker api_get('/market/ticker').symbolize_keys end |
.transactions ⇒ Object
The species transactions for the past hour as a list of lists, each composed of [unix_timestamp, transaction_id, price, quantity]
23 24 25 |
# File 'lib/bitex/market.rb', line 23 def self.transactions api_get('/market/transactions') end |