Class: BitFlyer::Models::BalanceHistory

Inherits:
Object
  • Object
show all
Defined in:
lib/bit_flyer/models/balance_history.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ BalanceHistory

trade_type: BUY: 買いSELL: 売りDEPOSIT: 入金・仮想通貨の預入WITHDRAW: 出金・仮想通貨の外部送付FEE: 手数料POST_COLL: 証拠金の預入CANCEL_COLL: 証拠金の引出PAYMENT: ビットコイン決済による仮想通貨の移転TRANSFER: その他の一般的な資金移動



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/bit_flyer/models/balance_history.rb', line 28

def initialize(attrs = {})
  @id = attrs['id']
  @trade_date = attrs['trade_date']
  @product_code = attrs['product_code']
  @currency_code = attrs['currency_code']
  @trade_type = attrs['trade_type']
  @price = attrs['price'] # 仮想通貨の取引時の値段(BTCなら1BTCの値段)
  @amount = attrs['amount'] # 取引した値段(日本円等)
  @quantity = attrs['quantity'] # 取引した仮想通貨量
  @commission = attrs['commission'] # 手数料(多分仮装通過の量)
  @balance = attrs['balance'] # 残金(1,0000円入金していて1000円で0.01BTCを買った時→9,000)
  @order_id = attrs['order_id']
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def amount
  @amount
end

#balanceObject (readonly)

Returns the value of attribute balance.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def balance
  @balance
end

#commissionObject (readonly)

Returns the value of attribute commission.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def commission
  @commission
end

#currency_codeObject (readonly)

Returns the value of attribute currency_code.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def currency_code
  @currency_code
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def id
  @id
end

#order_idObject (readonly)

Returns the value of attribute order_id.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def order_id
  @order_id
end

#priceObject (readonly)

Returns the value of attribute price.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def price
  @price
end

#product_codeObject (readonly)

Returns the value of attribute product_code.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def product_code
  @product_code
end

#quantityObject (readonly)

Returns the value of attribute quantity.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def quantity
  @quantity
end

#rade_typeObject (readonly)

Returns the value of attribute rade_type.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def rade_type
  @rade_type
end

#trade_dateObject (readonly)

Returns the value of attribute trade_date.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def trade_date
  @trade_date
end

#trade_typeObject (readonly)

Returns the value of attribute trade_type.



4
5
6
# File 'lib/bit_flyer/models/balance_history.rb', line 4

def trade_type
  @trade_type
end