Class: ItBitSDK::Trades::Trade

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params:) ⇒ Trade

Returns a new instance of Trade.



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

def initialize(params:)
  @order_id             = params['orderId']
  @timestamp            = params['timestamp']
  @instrument           = params['instrument']
  @direction            = params['direction']
  @currency_1           = params['currency1']
  @currency_1_amount    = params['currency1Amount']
  @currency_2           = params['currency2']
  @currency_2_amount    = params['currency2Amount']
  @rate                 = params['rate']
  @commission_paid      = params['commissionPaid']
  @commission_currency  = params['commissionCurrency']
  @rebates_applied      = params['rebatesApplied']
  @rebate_currency      = params['rebateCurrency']
end

Instance Attribute Details

#commission_currencyObject

Returns the value of attribute commission_currency.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def commission_currency
  @commission_currency
end

#commission_paidObject

Returns the value of attribute commission_paid.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def commission_paid
  @commission_paid
end

#currency_1Object

Returns the value of attribute currency_1.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def currency_1
  @currency_1
end

#currency_1_amountObject

Returns the value of attribute currency_1_amount.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def currency_1_amount
  @currency_1_amount
end

#currency_2Object

Returns the value of attribute currency_2.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def currency_2
  @currency_2
end

#currency_2_amountObject

Returns the value of attribute currency_2_amount.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def currency_2_amount
  @currency_2_amount
end

#directionObject

Returns the value of attribute direction.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def direction
  @direction
end

#instrumentObject

Returns the value of attribute instrument.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def instrument
  @instrument
end

#order_idObject

Returns the value of attribute order_id.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def order_id
  @order_id
end

#rateObject

Returns the value of attribute rate.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def rate
  @rate
end

#rebate_currencyObject

Returns the value of attribute rebate_currency.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def rebate_currency
  @rebate_currency
end

#rebates_appliedObject

Returns the value of attribute rebates_applied.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def rebates_applied
  @rebates_applied
end

#timestampObject

Returns the value of attribute timestamp.



4
5
6
# File 'lib/it_bit_sdk/domain/trades/trade.rb', line 4

def timestamp
  @timestamp
end