Class: BitFlyer::Models::Ticker
- Inherits:
-
Object
- Object
- BitFlyer::Models::Ticker
- Defined in:
- lib/bit_flyer/models/ticker.rb
Instance Attribute Summary collapse
-
#best_ask ⇒ Object
readonly
Returns the value of attribute best_ask.
-
#best_ask_size ⇒ Object
readonly
Returns the value of attribute best_ask_size.
-
#best_bid ⇒ Object
readonly
Returns the value of attribute best_bid.
-
#best_bid_size ⇒ Object
readonly
Returns the value of attribute best_bid_size.
-
#ltp ⇒ Object
readonly
Returns the value of attribute ltp.
-
#product_code ⇒ Object
readonly
Returns the value of attribute product_code.
-
#tick_id ⇒ Object
readonly
Returns the value of attribute tick_id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#total_ask_depth ⇒ Object
readonly
Returns the value of attribute total_ask_depth.
-
#total_bid_depth ⇒ Object
readonly
Returns the value of attribute total_bid_depth.
-
#volume ⇒ Object
readonly
Returns the value of attribute volume.
-
#volume_by_product ⇒ Object
readonly
Returns the value of attribute volume_by_product.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Ticker
constructor
A new instance of Ticker.
Constructor Details
#initialize(attrs = {}) ⇒ Ticker
Returns a new instance of Ticker.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bit_flyer/models/ticker.rb', line 17 def initialize(attrs = {}) @product_code = attrs['product_code'] @timestamp = Time.parse(attrs['timestamp']).in_time_zone('Tokyo') @tick_id = attrs['tick_id'] @best_bid = attrs['best_bid'] @best_ask = attrs['best_ask'] @best_bid_size = attrs['best_bid_size'] @best_ask_size = attrs['best_ask_size'] @total_bid_depth = attrs['total_bid_depth'] @total_ask_depth = attrs['total_ask_depth'] @ltp = attrs['ltp'] @volume = attrs['volume'] @volume_by_product = attrs['volume_by_product'] end |
Instance Attribute Details
#best_ask ⇒ Object (readonly)
Returns the value of attribute best_ask.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def best_ask @best_ask end |
#best_ask_size ⇒ Object (readonly)
Returns the value of attribute best_ask_size.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def best_ask_size @best_ask_size end |
#best_bid ⇒ Object (readonly)
Returns the value of attribute best_bid.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def best_bid @best_bid end |
#best_bid_size ⇒ Object (readonly)
Returns the value of attribute best_bid_size.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def best_bid_size @best_bid_size end |
#ltp ⇒ Object (readonly)
Returns the value of attribute ltp.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def ltp @ltp end |
#product_code ⇒ Object (readonly)
Returns the value of attribute product_code.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def product_code @product_code end |
#tick_id ⇒ Object (readonly)
Returns the value of attribute tick_id.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def tick_id @tick_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def @timestamp end |
#total_ask_depth ⇒ Object (readonly)
Returns the value of attribute total_ask_depth.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def total_ask_depth @total_ask_depth end |
#total_bid_depth ⇒ Object (readonly)
Returns the value of attribute total_bid_depth.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def total_bid_depth @total_bid_depth end |
#volume ⇒ Object (readonly)
Returns the value of attribute volume.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def volume @volume end |
#volume_by_product ⇒ Object (readonly)
Returns the value of attribute volume_by_product.
4 5 6 |
# File 'lib/bit_flyer/models/ticker.rb', line 4 def volume_by_product @volume_by_product end |