Class: RuBittrex::Market

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#extract_timestamp

Constructor Details

#initialize(attrs = {}) ⇒ Market

Returns a new instance of Market.



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ru_bittrex/market.rb', line 10

def initialize(attrs = {})
  @symbol           = attrs["symbol"]
  @base_currency    = attrs["baseCurrencySymbol"]
  @quote_currency   = attrs["quoteCurrencySymbol"]
  @min_trade        = attrs["minTradeSize"]
  @precision        = attrs["precision"]
  @status           = attrs["status"]
  @created_at       = extract_timestamp(attrs["createdAt"])
  @notice           = attrs["notice"]
  @prohibited_in    = attrs["prohibitedIn"]
  @terms_of_service = attrs["associatedTermsOfService"]
  @raw              = attrs
end

Instance Attribute Details

#base_currencyObject (readonly)

Returns the value of attribute base_currency.



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

def base_currency
  @base_currency
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#min_tradeObject (readonly)

Returns the value of attribute min_trade.



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

def min_trade
  @min_trade
end

#noticeObject (readonly)

Returns the value of attribute notice.



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

def notice
  @notice
end

#precisionObject (readonly)

Returns the value of attribute precision.



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

def precision
  @precision
end

#prohibited_inObject (readonly)

Returns the value of attribute prohibited_in.



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

def prohibited_in
  @prohibited_in
end

#quote_currencyObject (readonly)

Returns the value of attribute quote_currency.



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

def quote_currency
  @quote_currency
end

#rawObject (readonly)

Returns the value of attribute raw.



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

def raw
  @raw
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#symbolObject (readonly)

Returns the value of attribute symbol.



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

def symbol
  @symbol
end

#terms_of_serviceObject (readonly) Also known as: terms

Returns the value of attribute terms_of_service.



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

def terms_of_service
  @terms_of_service
end

Class Method Details

.all(params = {}) ⇒ Object



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

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

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



28
29
30
# File 'lib/ru_bittrex/market.rb', line 28

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