Class: Bittrex::Summary

Inherits:
Object
  • Object
show all
Defined in:
lib/bittrex/summary.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Summary

Returns a new instance of Summary.



8
9
10
11
12
13
14
15
16
17
# File 'lib/bittrex/summary.rb', line 8

def initialize(attrs = {})
  @name        = attrs['MarketName']
  @high        = attrs['High']
  @low         = attrs['Low']
  @volume      = attrs['Volume']
  @last        = attrs['Last']
  @base_volume = attrs['BaseVolume']
  @raw         = attrs
  @created_at  = Time.parse(attrs['TimeStamp'])
end

Instance Attribute Details

#base_volumeObject (readonly) Also known as: base_vol

Returns the value of attribute base_volume.



3
4
5
# File 'lib/bittrex/summary.rb', line 3

def base_volume
  @base_volume
end

#created_atObject (readonly)

Returns the value of attribute created_at.



3
4
5
# File 'lib/bittrex/summary.rb', line 3

def created_at
  @created_at
end

#highObject (readonly)

Returns the value of attribute high.



3
4
5
# File 'lib/bittrex/summary.rb', line 3

def high
  @high
end

#lastObject (readonly)

Returns the value of attribute last.



3
4
5
# File 'lib/bittrex/summary.rb', line 3

def last
  @last
end

#lowObject (readonly)

Returns the value of attribute low.



3
4
5
# File 'lib/bittrex/summary.rb', line 3

def low
  @low
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/bittrex/summary.rb', line 3

def name
  @name
end

#rawObject (readonly)

Returns the value of attribute raw.



3
4
5
# File 'lib/bittrex/summary.rb', line 3

def raw
  @raw
end

#volumeObject (readonly) Also known as: vol

Returns the value of attribute volume.



3
4
5
# File 'lib/bittrex/summary.rb', line 3

def volume
  @volume
end

Class Method Details

.allObject



19
20
21
# File 'lib/bittrex/summary.rb', line 19

def self.all
  client.get('public/getmarketsummaries').map{|data| new(data) }
end