class Vertpig::Summary
Attributes
ask[R]
base_vol[R]
base_volume[R]
bid[R]
created_at[R]
high[R]
last[R]
low[R]
name[R]
open_buy_orders[R]
open_sell_orders[R]
previous_day[R]
raw[R]
updated_at[R]
vol[R]
volume[R]
Public Class Methods
all()
click to toggle source
# File lib/vertpig/summary.rb, line 28 def self.all client.get('public/getmarketsummaries').map{|data| new(data) } end
new(attrs = {})
click to toggle source
# File lib/vertpig/summary.rb, line 11 def initialize(attrs = {}) @name = attrs['MarketName'] @high = attrs['High'] @low = attrs['Low'] @volume = attrs['Volume'] @last = attrs['Last'] @base_volume = attrs['BaseVolume'] @bid = attrs['Bid'] @ask = attrs['Ask'] @open_buy_orders = attrs['OpenBuyOrders'] @open_sell_orders = attrs['OpenSellOrders'] @previous_day = attrs['PrevDay'] @updated_at = extract_timestamp(attrs['TimeStamp']) @created_at = extract_timestamp(attrs['Created']) @raw = attrs end
Private Class Methods
client()
click to toggle source
# File lib/vertpig/summary.rb, line 34 def self.client @client ||= Vertpig.client end