Class: ItBitSDK::Ticker

Inherits:
Object
  • Object
show all
Defined in:
lib/it_bit_sdk/domain/ticker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params:) ⇒ Ticker

Returns a new instance of Ticker.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/it_bit_sdk/domain/ticker.rb', line 5

def initialize(params:)
  @pair         = params['pair']
  @bid          = params['bid']
  @bid_amt      = params['bidAmt']
  @ask          = params['ask']
  @ask_amt      = params['askAmt']
  @last_price   = params['lastPrice']
  @last_amt     = params['lastAmt']
  @volume_24h   = params['volume24h']
  @volume_today = params['volume_today']
  @high_24h     = params['high24h']
  @high_today   = params['high_today']
  @low_24h      = params['low24h']
  @low_today    = params['lowToday']
  @open_today   = params['openToday']
  @vwap_today   = params['vwapToday']
  @vwap_24h     = params['vwap24h']
end

Instance Attribute Details

#askObject

Returns the value of attribute ask.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def ask
  @ask
end

#ask_amtObject

Returns the value of attribute ask_amt.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def ask_amt
  @ask_amt
end

#bidObject

Returns the value of attribute bid.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def bid
  @bid
end

#bid_amtObject

Returns the value of attribute bid_amt.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def bid_amt
  @bid_amt
end

#high_24hObject

Returns the value of attribute high_24h.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def high_24h
  @high_24h
end

#high_todayObject

Returns the value of attribute high_today.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def high_today
  @high_today
end

#last_amtObject

Returns the value of attribute last_amt.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def last_amt
  @last_amt
end

#last_priceObject

Returns the value of attribute last_price.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def last_price
  @last_price
end

#low_24hObject

Returns the value of attribute low_24h.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def low_24h
  @low_24h
end

#low_todayObject

Returns the value of attribute low_today.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def low_today
  @low_today
end

#open_todayObject

Returns the value of attribute open_today.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def open_today
  @open_today
end

#pairObject

Returns the value of attribute pair.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def pair
  @pair
end

#volume_24hObject

Returns the value of attribute volume_24h.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def volume_24h
  @volume_24h
end

#volume_todayObject

Returns the value of attribute volume_today.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def volume_today
  @volume_today
end

#vwap_24hObject

Returns the value of attribute vwap_24h.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def vwap_24h
  @vwap_24h
end

#vwap_todayObject

Returns the value of attribute vwap_today.



3
4
5
# File 'lib/it_bit_sdk/domain/ticker.rb', line 3

def vwap_today
  @vwap_today
end