Class: Bitex::MarketData

Inherits:
Object
  • Object
show all
Defined in:
lib/bitex/market_data.rb

Overview

Public market data for a specie, do not use directly, use BitcoinMarketData instead.

Direct Known Subclasses

BitcoinCashMarketData, BitcoinMarketData

Class Method Summary collapse

Class Method Details

.last_24_hoursObject

Returns a list of lists with aggregated transaction data for each hour from the last 24 hours.



29
30
31
# File 'lib/bitex/market_data.rb', line 29

def self.last_24_hours
  api_get('/market/last_24_hours')
end

.last_30_daysObject

Returns a list of lists with aggregated transaction data for each day from the last 30 days.



43
44
45
# File 'lib/bitex/market_data.rb', line 43

def self.last_30_days
  api_get('/market/last_30_days')
end

.last_7_daysObject

Returns a list of lists with aggregated transaction data for each 4 hour period from the last 7 days.



36
37
38
# File 'lib/bitex/market_data.rb', line 36

def self.last_7_days
  api_get('/market/last_7_days')
end

.order_bookObject

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]



15
16
17
# File 'lib/bitex/market_data.rb', line 15

def self.order_book
  api_get('/market/order_book').symbolize_keys
end

.tickerObject

The species currency ticker conveniently formatted as a ruby Hash with symbolized keys.



8
9
10
# File 'lib/bitex/market_data.rb', line 8

def self.ticker
  api_get('/market/ticker').symbolize_keys
end

.transactionsObject

The species transactions for the past hour as a list of lists, each composed of [unix_timestamp, transaction_id, price, quantity]



22
23
24
# File 'lib/bitex/market_data.rb', line 22

def self.transactions
  api_get('/market/transactions')
end