Class: RuBittrex::Ticker
- Inherits:
-
Object
- Object
- RuBittrex::Ticker
- Extended by:
- ClientHelper
- Includes:
- Helpers
- Defined in:
- lib/ru_bittrex/ticker.rb
Instance Attribute Summary collapse
-
#ask_rate ⇒ Object
readonly
Returns the value of attribute ask_rate.
-
#bid_rate ⇒ Object
readonly
Returns the value of attribute bid_rate.
-
#last_rate ⇒ Object
readonly
Returns the value of attribute last_rate.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Ticker
constructor
A new instance of Ticker.
Methods included from Helpers
Constructor Details
#initialize(attrs = {}) ⇒ Ticker
Returns a new instance of Ticker.
8 9 10 11 12 13 14 |
# File 'lib/ru_bittrex/ticker.rb', line 8 def initialize(attrs = {}) @symbol = attrs["symbol"] @last_rate = attrs["lastTradeRate"] @bid_rate = attrs["bidRate"] @ask_rate = attrs["askRate"] @raw = attrs end |
Instance Attribute Details
#ask_rate ⇒ Object (readonly)
Returns the value of attribute ask_rate.
6 7 8 |
# File 'lib/ru_bittrex/ticker.rb', line 6 def ask_rate @ask_rate end |
#bid_rate ⇒ Object (readonly)
Returns the value of attribute bid_rate.
6 7 8 |
# File 'lib/ru_bittrex/ticker.rb', line 6 def bid_rate @bid_rate end |
#last_rate ⇒ Object (readonly)
Returns the value of attribute last_rate.
6 7 8 |
# File 'lib/ru_bittrex/ticker.rb', line 6 def last_rate @last_rate end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
6 7 8 |
# File 'lib/ru_bittrex/ticker.rb', line 6 def raw @raw end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
6 7 8 |
# File 'lib/ru_bittrex/ticker.rb', line 6 def symbol @symbol end |
Class Method Details
.all(params = {}) ⇒ Object
16 17 18 |
# File 'lib/ru_bittrex/ticker.rb', line 16 def self.all(params = {}) collection _get('markets/tickers', params) end |
.get(market, params = {}) ⇒ Object
20 21 22 |
# File 'lib/ru_bittrex/ticker.rb', line 20 def self.get(market, params = {}) new _get("markets/#{market}/ticker", params) end |