class Bitex::MarketData

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

Public Class Methods

api_get(path, options = {}) click to toggle source

@visibility private

# File lib/bitex/market_data.rb, line 48
def self.api_get(path, options = {})
  Api.public("/#{specie}#{path}", options)
end
last_24_hours() click to toggle source

Returns a list of lists with aggregated transaction data for each hour from the last 24 hours. @see bitex.la/developers#last_24_hours

# File lib/bitex/market_data.rb, line 29
def self.last_24_hours
  api_get('/market/last_24_hours')
end
last_30_days() click to toggle source

Returns a list of lists with aggregated transaction data for each day from the last 30 days. @see bitex.la/developers#last_30_days

# File lib/bitex/market_data.rb, line 43
def self.last_30_days
  api_get('/market/last_30_days')
end
last_7_days() click to toggle source

Returns a list of lists with aggregated transaction data for each 4 hour period from the last 7 days. @see bitex.la/developers#last_7_days

# File lib/bitex/market_data.rb, line 36
def self.last_7_days
  api_get('/market/last_7_days')
end
order_book() click to toggle source

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] @see bitex.la/developers#orderbook

# File lib/bitex/market_data.rb, line 15
def self.order_book
  api_get('/market/order_book').symbolize_keys
end
ticker() click to toggle source

The species currency ticker conveniently formatted as a ruby Hash with symbolized keys. @see bitex.la/developers#ticker

# File lib/bitex/market_data.rb, line 8
def self.ticker
  api_get('/market/ticker').symbolize_keys
end
transactions() click to toggle source

The species transactions for the past hour as a list of lists, each composed of [unix_timestamp, transaction_id, price, quantity] @see bitex.la/developers#transactions

# File lib/bitex/market_data.rb, line 22
def self.transactions
  api_get('/market/transactions')
end