Class: RuBittrex::Summary

Inherits:
Object
  • Object
show all
Extended by:
ClientHelper
Includes:
Helpers
Defined in:
lib/ru_bittrex/summary.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#extract_timestamp

Constructor Details

#initialize(attrs = {}) ⇒ Summary

Returns a new instance of Summary.



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

def initialize(attrs = {})
  @symbol         = attrs["symbol"]
  @high           = attrs["high"]
  @low            = attrs["low"]
  @volume         = attrs["volume"]
  @quote_volume   = attrs["quoteVolume"]
  @percent_change = attrs["percentChange"]
  @updated_at     = extract_timestamp(attrs["updatedAt"])
  @raw            = attrs
end

Instance Attribute Details

#highObject (readonly)

Returns the value of attribute high.



6
7
8
# File 'lib/ru_bittrex/summary.rb', line 6

def high
  @high
end

#lowObject (readonly)

Returns the value of attribute low.



6
7
8
# File 'lib/ru_bittrex/summary.rb', line 6

def low
  @low
end

#percent_changeObject (readonly)

Returns the value of attribute percent_change.



6
7
8
# File 'lib/ru_bittrex/summary.rb', line 6

def percent_change
  @percent_change
end

#quote_volumeObject (readonly)

Returns the value of attribute quote_volume.



6
7
8
# File 'lib/ru_bittrex/summary.rb', line 6

def quote_volume
  @quote_volume
end

#rawObject (readonly)

Returns the value of attribute raw.



6
7
8
# File 'lib/ru_bittrex/summary.rb', line 6

def raw
  @raw
end

#symbolObject (readonly)

Returns the value of attribute symbol.



6
7
8
# File 'lib/ru_bittrex/summary.rb', line 6

def symbol
  @symbol
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



6
7
8
# File 'lib/ru_bittrex/summary.rb', line 6

def updated_at
  @updated_at
end

#volumeObject (readonly)

Returns the value of attribute volume.



6
7
8
# File 'lib/ru_bittrex/summary.rb', line 6

def volume
  @volume
end

Class Method Details

.all(params = {}) ⇒ Object



20
21
22
# File 'lib/ru_bittrex/summary.rb', line 20

def self.all(params = {})
  collection _get('markets/summaries', params)
end

.get(market, params = {}) ⇒ Object



24
25
26
# File 'lib/ru_bittrex/summary.rb', line 24

def self.get(market, params = {})
  new _get("markets/#{market}/summary", params)
end