class Vertpig::Market
Attributes
active[R]
base[R]
base_name[R]
created_at[R]
currency[R]
currency_name[R]
minimum_trade[R]
name[R]
raw[R]
Public Class Methods
all()
click to toggle source
# File lib/vertpig/market.rb, line 21 def self.all client.get('public/getmarkets').map{|data| new(data) } end
new(attrs = {})
click to toggle source
# File lib/vertpig/market.rb, line 9 def initialize(attrs = {}) @name = attrs['MarketName'] @currency = attrs['MarketCurrency'] @base = attrs['BaseCurrency'] @currency_name = attrs['MarketCurrencyLong'] @base_name = attrs['BaseCurrencyLong'] @minimum_trade = attrs['MinTradeSize'] @active = attrs['IsActive'] @created_at = extract_timestamp(attrs['Created']) @raw = attrs end
Private Class Methods
client()
click to toggle source
# File lib/vertpig/market.rb, line 27 def self.client @client ||= Vertpig.client end