Class: ItBitSDK::Trade
- Inherits:
-
Object
- Object
- ItBitSDK::Trade
- Defined in:
- lib/it_bit_sdk/domain/trade.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#match_number ⇒ Object
Returns the value of attribute match_number.
-
#price ⇒ Object
Returns the value of attribute price.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(params:) ⇒ Trade
constructor
A new instance of Trade.
Constructor Details
#initialize(params:) ⇒ Trade
Returns a new instance of Trade.
5 6 7 8 9 10 |
# File 'lib/it_bit_sdk/domain/trade.rb', line 5 def initialize(params:) @timestamp = Time.parse(params['timestamp']) @match_number = params['matchNumber'] @price = params['price'].to_f @amount = params['amount'].to_f end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/it_bit_sdk/domain/trade.rb', line 3 def amount @amount end |
#match_number ⇒ Object
Returns the value of attribute match_number.
3 4 5 |
# File 'lib/it_bit_sdk/domain/trade.rb', line 3 def match_number @match_number end |
#price ⇒ Object
Returns the value of attribute price.
3 4 5 |
# File 'lib/it_bit_sdk/domain/trade.rb', line 3 def price @price end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/it_bit_sdk/domain/trade.rb', line 3 def @timestamp end |